├── C++大作业 ├── Debug │ └── Data │ │ ├── Brick.png │ │ ├── baozha.wav │ │ ├── fashe.wav │ │ ├── muban.jpg │ │ ├── shuye.png │ │ ├── tankdown.png │ │ ├── tankleft.png │ │ ├── tankright.png │ │ └── tankup.png ├── MyZhouTank │ ├── ConfigDlg.cpp │ ├── ConfigDlg.h │ ├── Debug │ │ └── MyZhouTank.exe.recipe │ ├── MyObject.cpp │ ├── MyObject.h │ ├── MyZhouTank.aps │ ├── MyZhouTank.cpp │ ├── MyZhouTank.h │ ├── MyZhouTank.rc │ ├── MyZhouTank.vcxproj │ ├── MyZhouTank.vcxproj.filters │ ├── MyZhouTank.vcxproj.user │ ├── MyZhouTankDlg.cpp │ ├── MyZhouTankDlg.h │ ├── Release │ │ └── MyZhouTank.exe.recipe │ ├── Shell.cpp │ ├── Shell.h │ ├── Tank.cpp │ ├── Tank.h │ ├── Tree.cpp │ ├── Tree.h │ ├── Wall.cpp │ ├── Wall.h │ ├── Wood.h │ ├── framework.h │ ├── pch.cpp │ ├── pch.h │ ├── res │ │ ├── MyZhouTank.ico │ │ └── MyZhouTank.rc2 │ ├── resource.h │ ├── targetver.h │ └── x64 │ │ └── Debug │ │ └── MyZhouTank.exe.recipe └── x64 │ └── Debug │ └── MyZhouTank.exe ├── Java网络程序设计大作业 ├── bin │ ├── Final │ │ ├── FinalExam$1.class │ │ ├── FinalExam$2.class │ │ └── FinalExam.class │ ├── module-info.class │ └── shixi │ │ ├── A.class │ │ ├── ArrayOfStringsExample.class │ │ ├── B.class │ │ ├── BreakExample.class │ │ ├── C.class │ │ ├── Car.class │ │ ├── CarDemo.class │ │ ├── Circle.class │ │ ├── CommonMobilePhone.class │ │ ├── CommonPhone.class │ │ ├── ConstructorTest.class │ │ ├── Dog.class │ │ ├── FinalTest$1.class │ │ ├── FinalTest.class │ │ ├── FixedPhone.class │ │ ├── FunnyNumbers.class │ │ ├── GuessNumberName.class │ │ ├── IPPhone.class │ │ ├── IfElseExample.class │ │ ├── MobilePhone.class │ │ ├── PersonalHandphoneSystem.class │ │ ├── Philosopher.class │ │ ├── Phone.class │ │ ├── Rectangle.class │ │ ├── Say_Hello_to_You.class │ │ ├── Shape.class │ │ ├── ShapeTestWithPolymorphism.class │ │ ├── Speaker.class │ │ ├── Talking.class │ │ ├── Telephone.class │ │ ├── TrashCar.class │ │ ├── WhileExample.class │ │ ├── Work3$1.class │ │ ├── Work3.class │ │ └── Work4.class ├── image │ ├── beijing.jpeg │ ├── bianji.png │ ├── dianzan.png │ ├── fasong.png │ ├── shoucang.png │ └── sousuo.png └── src │ ├── Final │ └── FinalExam.java │ ├── module-info.java │ └── shixi │ ├── ArrayOfStringsExample.java │ ├── BreakExample.java │ ├── CarDemo.java │ ├── ConstructorTest.java │ ├── FinalTest.java │ ├── FunnyNumbers.java │ ├── GeneralFunction.java │ ├── GuessNumberName.java │ ├── IfElseExample.java │ ├── Say_Hello_to_You.java │ ├── ShapeTestWithPolymorphism.java │ ├── Talking.java │ ├── Telephone.java │ ├── WhileExample.java │ ├── Work3.java │ └── Work4.java ├── README.md ├── WebGIS课间实习 ├── .gitignore ├── README.md ├── babel.config.js ├── jsconfig.json ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── img │ │ ├── 上海.jpeg │ │ ├── 北京.jpeg │ │ ├── 地理信息.svg │ │ ├── 地理信息平台.svg │ │ ├── 武汉.jpeg │ │ └── 重庆.jpeg │ └── index.html ├── src │ ├── App.vue │ ├── assets │ │ ├── logo.png │ │ └── map │ │ │ └── bmap.js │ ├── components │ │ ├── China.vue │ │ ├── GoodsList.vue │ │ ├── Home.vue │ │ ├── Map.vue │ │ ├── ShoppingCart.vue │ │ ├── Thematic.vue │ │ └── json2xml.vue │ ├── main.js │ ├── map │ │ ├── china.js │ │ └── china.json │ ├── router │ │ └── index.js │ └── store │ │ └── index.js └── vue.config.js ├── 数字图像处理实习 ├── opencvtest.sln └── opencvtest │ ├── 1.jpg │ ├── 2.bmp │ ├── 3.bmp │ ├── 4.bmp │ ├── opencvtest.cpp │ ├── opencvtest.vcxproj │ ├── opencvtest.vcxproj.filters │ └── opencvtest.vcxproj.user ├── 数据结构实习 ├── DIJKSTRA TEST.sln ├── DIJKSTRA TEST │ ├── DIJKSTRA TEST.cpp │ ├── DIJKSTRA TEST.vcxproj │ ├── DIJKSTRA TEST.vcxproj.filters │ ├── DIJKSTRA TEST.vcxproj.user │ ├── cities.csv │ ├── graph.htm │ └── routes.csv └── README.md └── 计算机图形学实习 ├── ComputerGraphicDDA.sln ├── ComputerGraphicDDA ├── CObject3D.cpp ├── CObject3D.h ├── CReality.cpp ├── CReality.h ├── ClassView.cpp ├── ClassView.h ├── ComputerGraphicDDA.aps ├── ComputerGraphicDDA.cpp ├── ComputerGraphicDDA.h ├── ComputerGraphicDDA.rc ├── ComputerGraphicDDA.vcxproj ├── ComputerGraphicDDA.vcxproj.filters ├── ComputerGraphicDDA.vcxproj.user ├── ComputerGraphicDDADoc.cpp ├── ComputerGraphicDDADoc.h ├── ComputerGraphicDDAView.cpp ├── ComputerGraphicDDAView.h ├── FileView.cpp ├── FileView.h ├── MainFrm.cpp ├── MainFrm.h ├── OutputWnd.cpp ├── OutputWnd.h ├── PropertiesWnd.cpp ├── PropertiesWnd.h ├── SetCharDlg.cpp ├── SetCharDlg.h ├── ViewTree.cpp ├── ViewTree.h ├── framework.h ├── pch.cpp ├── pch.h ├── res │ ├── ComputerGraphicDDA.ico │ ├── ComputerGraphicDDA.rc2 │ ├── ComputerGraphicDDADoc.ico │ ├── Toolbar.bmp │ ├── Toolbar256.bmp │ ├── bitmap1.bmp │ ├── class_view.ico │ ├── class_view_hc.ico │ ├── classview.bmp │ ├── classview_hc.bmp │ ├── explorer.bmp │ ├── explorer_hc.bmp │ ├── file_view.ico │ ├── file_view_hc.ico │ ├── fileview.bmp │ ├── fileview_hc.bmp │ ├── menuimages.bmp │ ├── menuimages_hc.bmp │ ├── output_wnd.ico │ ├── output_wnd_hc.ico │ ├── properties.bmp │ ├── properties_hc.bmp │ ├── properties_wnd.ico │ ├── properties_wnd_hc.ico │ ├── sort.bmp │ ├── sort_hc.bmp │ └── userimages.bmp ├── resource.h ├── senpai.bmp └── targetver.h └── README.md /C++大作业/Debug/Data/Brick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/Brick.png -------------------------------------------------------------------------------- /C++大作业/Debug/Data/baozha.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/baozha.wav -------------------------------------------------------------------------------- /C++大作业/Debug/Data/fashe.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/fashe.wav -------------------------------------------------------------------------------- /C++大作业/Debug/Data/muban.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/muban.jpg -------------------------------------------------------------------------------- /C++大作业/Debug/Data/shuye.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/shuye.png -------------------------------------------------------------------------------- /C++大作业/Debug/Data/tankdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/tankdown.png -------------------------------------------------------------------------------- /C++大作业/Debug/Data/tankleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/tankleft.png -------------------------------------------------------------------------------- /C++大作业/Debug/Data/tankright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/tankright.png -------------------------------------------------------------------------------- /C++大作业/Debug/Data/tankup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/Debug/Data/tankup.png -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/ConfigDlg.cpp: -------------------------------------------------------------------------------- 1 | // ConfigDlg.cpp : implementation file 2 | // 3 | 4 | #include "pch.h" 5 | #include "MyZhouTank.h" 6 | #include "ConfigDlg.h" 7 | #include "afxdialogex.h" 8 | 9 | 10 | // ConfigDlg dialog 11 | 12 | IMPLEMENT_DYNAMIC(ConfigDlg, CDialogEx) 13 | 14 | ConfigDlg::ConfigDlg(CWnd* pParent /*=nullptr*/) 15 | : CDialogEx(IDD_DIALOG_CONFIG, pParent) 16 | { 17 | 18 | } 19 | 20 | ConfigDlg::~ConfigDlg() 21 | { 22 | } 23 | 24 | void ConfigDlg::DoDataExchange(CDataExchange* pDX) 25 | { 26 | CDialogEx::DoDataExchange(pDX); 27 | } 28 | 29 | 30 | BEGIN_MESSAGE_MAP(ConfigDlg, CDialogEx) 31 | END_MESSAGE_MAP() 32 | 33 | 34 | // ConfigDlg message handlers 35 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/ConfigDlg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // ConfigDlg dialog 5 | 6 | class ConfigDlg : public CDialogEx 7 | { 8 | DECLARE_DYNAMIC(ConfigDlg) 9 | 10 | public: 11 | ConfigDlg(CWnd* pParent = nullptr); // standard constructor 12 | virtual ~ConfigDlg(); 13 | 14 | // Dialog Data 15 | #ifdef AFX_DESIGN_TIME 16 | enum { IDD = IDD_DIALOG_CONFIG }; 17 | #endif 18 | 19 | protected: 20 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 21 | 22 | DECLARE_MESSAGE_MAP() 23 | }; 24 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Debug/MyZhouTank.exe.recipe: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | C:\Users\DDA\source\repos\MyZhouTank\Debug\MyZhouTank.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyObject.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/MyObject.cpp -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyObject.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "sapi.h" 3 | #include 4 | #include 5 | #include 6 | class MyObject 7 | { 8 | public: 9 | MyObject() { m_nSize = 10; }; 10 | ~MyObject() {}; 11 | void Draw(CDC* pDC) { 12 | pDC->Ellipse(m_ptPos.x - m_nSize, m_ptPos.y - m_nSize, m_ptPos.x + m_nSize, m_ptPos.y + m_nSize); 13 | }; 14 | void Move(int nDirection) {}; 15 | bool IsOverLap(MyObject& obj); 16 | void SetSize(int nSize); 17 | void SetDirection(int nDir) { 18 | if (nDir < 1 || nDir>4) { 19 | m_nDirection = 1; 20 | } 21 | else { 22 | m_nDirection = nDir; 23 | } 24 | } 25 | 26 | public: 27 | int m_Speed; 28 | 29 | int m_Armor; 30 | CPoint m_ptPos; 31 | 32 | int m_nDirection; 33 | int m_nSize; 34 | 35 | protected: 36 | 37 | 38 | }; 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/MyZhouTank.aps -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.cpp: -------------------------------------------------------------------------------- 1 | 2 | // MyZhouTank.cpp : Defines the class behaviors for the application. 3 | // 4 | 5 | #include "pch.h" 6 | #include "framework.h" 7 | #include "MyZhouTank.h" 8 | #include "MyZhouTankDlg.h" 9 | 10 | #ifdef _DEBUG 11 | #define new DEBUG_NEW 12 | #endif 13 | 14 | 15 | // CMyZhouTankApp 16 | 17 | BEGIN_MESSAGE_MAP(CMyZhouTankApp, CWinApp) 18 | ON_COMMAND(ID_HELP, &CWinApp::OnHelp) 19 | END_MESSAGE_MAP() 20 | 21 | 22 | // CMyZhouTankApp construction 23 | 24 | CMyZhouTankApp::CMyZhouTankApp() 25 | { 26 | // support Restart Manager 27 | m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART; 28 | 29 | // TODO: add construction code here, 30 | // Place all significant initialization in InitInstance 31 | } 32 | 33 | 34 | // The one and only CMyZhouTankApp object 35 | 36 | CMyZhouTankApp theApp; 37 | 38 | 39 | // CMyZhouTankApp initialization 40 | 41 | BOOL CMyZhouTankApp::InitInstance() 42 | { 43 | // InitCommonControlsEx() is required on Windows XP if an application 44 | // manifest specifies use of ComCtl32.dll version 6 or later to enable 45 | // visual styles. Otherwise, any window creation will fail. 46 | INITCOMMONCONTROLSEX InitCtrls; 47 | InitCtrls.dwSize = sizeof(InitCtrls); 48 | // Set this to include all the common control classes you want to use 49 | // in your application. 50 | InitCtrls.dwICC = ICC_WIN95_CLASSES; 51 | InitCommonControlsEx(&InitCtrls); 52 | 53 | CWinApp::InitInstance(); 54 | 55 | 56 | AfxEnableControlContainer(); 57 | 58 | // Create the shell manager, in case the dialog contains 59 | // any shell tree view or shell list view controls. 60 | CShellManager *pShellManager = new CShellManager; 61 | 62 | // Activate "Windows Native" visual manager for enabling themes in MFC controls 63 | CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows)); 64 | 65 | // Standard initialization 66 | // If you are not using these features and wish to reduce the size 67 | // of your final executable, you should remove from the following 68 | // the specific initialization routines you do not need 69 | // Change the registry key under which our settings are stored 70 | // TODO: You should modify this string to be something appropriate 71 | // such as the name of your company or organization 72 | SetRegistryKey(_T("Local AppWizard-Generated Applications")); 73 | 74 | CMyZhouTankDlg dlg; 75 | m_pMainWnd = &dlg; 76 | INT_PTR nResponse = dlg.DoModal(); 77 | if (nResponse == IDOK) 78 | { 79 | // TODO: Place code here to handle when the dialog is 80 | // dismissed with OK 81 | } 82 | else if (nResponse == IDCANCEL) 83 | { 84 | // TODO: Place code here to handle when the dialog is 85 | // dismissed with Cancel 86 | } 87 | else if (nResponse == -1) 88 | { 89 | TRACE(traceAppMsg, 0, "Warning: dialog creation failed, so application is terminating unexpectedly.\n"); 90 | TRACE(traceAppMsg, 0, "Warning: if you are using MFC controls on the dialog, you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n"); 91 | } 92 | 93 | // Delete the shell manager created above. 94 | if (pShellManager != nullptr) 95 | { 96 | delete pShellManager; 97 | } 98 | 99 | #if !defined(_AFXDLL) && !defined(_AFX_NO_MFC_CONTROLS_IN_DIALOGS) 100 | ControlBarCleanUp(); 101 | #endif 102 | 103 | // Since the dialog has been closed, return FALSE so that we exit the 104 | // application, rather than start the application's message pump. 105 | return FALSE; 106 | } 107 | 108 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.h: -------------------------------------------------------------------------------- 1 | 2 | // MyZhouTank.h : main header file for the PROJECT_NAME application 3 | // 4 | 5 | #pragma once 6 | 7 | #ifndef __AFXWIN_H__ 8 | #error "include 'pch.h' before including this file for PCH" 9 | #endif 10 | 11 | #include "resource.h" // main symbols 12 | 13 | 14 | // CMyZhouTankApp: 15 | // See MyZhouTank.cpp for the implementation of this class 16 | // 17 | 18 | class CMyZhouTankApp : public CWinApp 19 | { 20 | public: 21 | CMyZhouTankApp(); 22 | 23 | // Overrides 24 | public: 25 | virtual BOOL InitInstance(); 26 | 27 | // Implementation 28 | 29 | DECLARE_MESSAGE_MAP() 30 | }; 31 | 32 | extern CMyZhouTankApp theApp; 33 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/MyZhouTank.rc -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | {16D9BE22-883C-4847-923C-C37B4A560AD1} 24 | MFCProj 25 | MyZhouTank 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v142 33 | Unicode 34 | Dynamic 35 | 36 | 37 | Application 38 | false 39 | v142 40 | true 41 | Unicode 42 | Dynamic 43 | 44 | 45 | Application 46 | true 47 | v142 48 | Unicode 49 | Dynamic 50 | 51 | 52 | Application 53 | false 54 | v142 55 | true 56 | Unicode 57 | Dynamic 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | true 79 | 80 | 81 | true 82 | 83 | 84 | false 85 | 86 | 87 | false 88 | 89 | 90 | 91 | Use 92 | Level3 93 | true 94 | WIN32;_WINDOWS;_DEBUG;%(PreprocessorDefinitions) 95 | pch.h 96 | 97 | 98 | Windows 99 | 100 | 101 | false 102 | true 103 | _DEBUG;%(PreprocessorDefinitions) 104 | 105 | 106 | 0x0409 107 | _DEBUG;%(PreprocessorDefinitions) 108 | $(IntDir);%(AdditionalIncludeDirectories) 109 | 110 | 111 | 112 | 113 | Use 114 | Level3 115 | true 116 | _WINDOWS;_DEBUG;%(PreprocessorDefinitions) 117 | pch.h 118 | 119 | 120 | Windows 121 | 122 | 123 | false 124 | true 125 | _DEBUG;%(PreprocessorDefinitions) 126 | 127 | 128 | 0x0409 129 | _DEBUG;%(PreprocessorDefinitions) 130 | $(IntDir);%(AdditionalIncludeDirectories) 131 | 132 | 133 | 134 | 135 | Use 136 | Level3 137 | true 138 | true 139 | true 140 | WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions) 141 | pch.h 142 | 143 | 144 | Windows 145 | true 146 | true 147 | 148 | 149 | false 150 | true 151 | NDEBUG;%(PreprocessorDefinitions) 152 | 153 | 154 | 0x0409 155 | NDEBUG;%(PreprocessorDefinitions) 156 | $(IntDir);%(AdditionalIncludeDirectories) 157 | 158 | 159 | 160 | 161 | Use 162 | Level3 163 | true 164 | true 165 | true 166 | _WINDOWS;NDEBUG;%(PreprocessorDefinitions) 167 | pch.h 168 | 169 | 170 | Windows 171 | true 172 | true 173 | 174 | 175 | false 176 | true 177 | NDEBUG;%(PreprocessorDefinitions) 178 | 179 | 180 | 0x0409 181 | NDEBUG;%(PreprocessorDefinitions) 182 | $(IntDir);%(AdditionalIncludeDirectories) 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | Create 206 | Create 207 | Create 208 | Create 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | Header Files 32 | 33 | 34 | Header Files 35 | 36 | 37 | Header Files 38 | 39 | 40 | Header Files 41 | 42 | 43 | Header Files 44 | 45 | 46 | Header Files 47 | 48 | 49 | Header Files 50 | 51 | 52 | Header Files 53 | 54 | 55 | 56 | 57 | Source Files 58 | 59 | 60 | Source Files 61 | 62 | 63 | Source Files 64 | 65 | 66 | Source Files 67 | 68 | 69 | Source Files 70 | 71 | 72 | Source Files 73 | 74 | 75 | Source Files 76 | 77 | 78 | Source Files 79 | 80 | 81 | Source Files 82 | 83 | 84 | 85 | 86 | Resource Files 87 | 88 | 89 | 90 | 91 | Resource Files 92 | 93 | 94 | 95 | 96 | Resource Files 97 | 98 | 99 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTank.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | MyZhouTank.rc 5 | 6 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTankDlg.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/MyZhouTankDlg.cpp -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/MyZhouTankDlg.h: -------------------------------------------------------------------------------- 1 | 2 | // MyZhouTankDlg.h : header file 3 | // 4 | 5 | #pragma once 6 | #include "Tank.h" 7 | #include 8 | #include "Wall.h" 9 | #include "Shell.h" 10 | #include "sapi.h" 11 | #include "Tree.h" 12 | // CMyZhouTankDlg dialog 13 | class CMyZhouTankDlg : public CDialogEx 14 | { 15 | // Construction 16 | public: 17 | CMyZhouTankDlg(CWnd* pParent = nullptr); // standard constructor 18 | 19 | // Dialog Data 20 | #ifdef AFX_DESIGN_TIME 21 | enum { IDD = IDD_MYZHOUTANK_DIALOG }; 22 | #endif 23 | 24 | 25 | 26 | protected: 27 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support 28 | public: 29 | Tank m_Tank; 30 | 31 | std::vector m_vecShell; 32 | std::vector m_vecWall; 33 | std::vector m_vecTank; 34 | std::vector m_vecTree; 35 | bool start = false; 36 | Wall walltest; 37 | Tree treetest; 38 | int win = 1; 39 | // Implementation 40 | protected: 41 | HICON m_hIcon; 42 | 43 | // Generated message map functions 44 | virtual BOOL OnInitDialog(); 45 | afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 46 | afx_msg void OnPaint(); 47 | afx_msg HCURSOR OnQueryDragIcon(); 48 | DECLARE_MESSAGE_MAP() 49 | public: 50 | afx_msg void OnBnClickedButton1(); 51 | afx_msg void OnBnClickedButton2(); 52 | afx_msg BOOL OnEraseBkgnd(CDC* pDC); 53 | virtual BOOL PreTranslateMessage(MSG* pMsg); 54 | afx_msg void OnTimer(UINT_PTR nIDEvent); 55 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 56 | afx_msg void OnBnClickedOk(); 57 | }; 58 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Release/MyZhouTank.exe.recipe: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | C:\Users\DDA\source\repos\MyZhouTank\Release\MyZhouTank.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Shell.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/Shell.cpp -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Shell.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MyObject.h" 3 | class Shell : public MyObject 4 | { 5 | 6 | public: 7 | Shell(); 8 | ~Shell() {}; 9 | void Draw(CDC* pDC); 10 | void Move(); 11 | bool f; 12 | public: 13 | __int64 m_InitialTime; 14 | }; 15 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Tank.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/Tank.cpp -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Tank.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Shell.h" 3 | #include "MyObject.h" 4 | #include 5 | #include "Wall.h" 6 | class Tank : public MyObject 7 | { 8 | public: 9 | void IsMoveEnable(std::vector m_vecWall,int i); 10 | 11 | Tank(); 12 | ~Tank() {}; 13 | void Draw(CDC* pDC); 14 | void Move(int nDirection); 15 | Shell Fire(); 16 | bool f; 17 | void Judge(); 18 | void SetPosition(int x, int y); 19 | public: 20 | static CImage img[5]; 21 | int m_SpeedTank[5]; 22 | 23 | 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Tree.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Tree.h" 3 | Tree::Tree() { 4 | m_Speed = 0; 5 | m_Armor = 2; 6 | m_nDirection = 1; 7 | m_ptPos.x = -1; 8 | m_ptPos.y = -1; 9 | TCHAR cFilePathName[1024]; 10 | GetModuleFileName(NULL, cFilePathName, 1024); 11 | CString str = cFilePathName; 12 | int npos = str.ReverseFind('\\'); 13 | CString strPathName = str.Left(npos); 14 | strPathName += L"\\Data"; 15 | CString strImagePathName; 16 | strImagePathName = strPathName + L"\\shuye.png"; 17 | m_Brick.Load(strImagePathName); 18 | m_nSize = 20; 19 | } 20 | 21 | 22 | Tree::~Tree() { 23 | 24 | } 25 | 26 | void Tree::SetArmor(int nArmor) { 27 | m_Armor = nArmor; 28 | } 29 | 30 | void Tree::SetPosition(int x, int y) { 31 | m_ptPos.x = x; 32 | m_ptPos.y = y; 33 | } 34 | 35 | void Tree::Draw(CDC* pDC, CRect rct) { 36 | if (m_Armor < 1)return; 37 | 38 | 39 | if (!m_Brick.IsNull()) { 40 | m_Brick.Draw(pDC->GetSafeHdc(), rct); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Tree.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MyObject.h" 3 | class Tree :public MyObject 4 | { 5 | public: 6 | Tree(); 7 | ~Tree(); 8 | void SetArmor(int nArmor); 9 | void SetPosition(int x, int y); 10 | void Draw(CDC* pDC, CRect rct); 11 | CImage m_Brick; 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Wall.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Wall.h" 3 | 4 | Wall::Wall() { 5 | m_Speed = 0; 6 | m_Armor = 2; 7 | m_nDirection = 1; 8 | m_ptPos.x = -1; 9 | m_ptPos.y = -1; 10 | TCHAR cFilePathName[1024]; 11 | GetModuleFileName(NULL, cFilePathName, 1024); 12 | CString str = cFilePathName; 13 | int npos = str.ReverseFind('\\'); 14 | CString strPathName = str.Left(npos); 15 | strPathName += L"\\Data"; 16 | CString strImagePathName; 17 | strImagePathName = strPathName + L"\\Brick.png"; 18 | m_Brick.Load(strImagePathName); 19 | m_nSize = 20; 20 | } 21 | 22 | 23 | Wall::~Wall() { 24 | 25 | } 26 | 27 | void Wall::SetArmor(int nArmor) { 28 | m_Armor = nArmor; 29 | } 30 | 31 | void Wall::SetPosition(int x, int y) { 32 | m_ptPos.x = x; 33 | m_ptPos.y = y; 34 | } 35 | 36 | void Wall::Draw(CDC* pDC, CRect rct) { 37 | if (m_Armor < 1)return; 38 | 39 | 40 | if (!m_Brick.IsNull()) { 41 | m_Brick.Draw(pDC->GetSafeHdc(), rct); 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Wall.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "MyObject.h" 3 | #include "Shell.h" 4 | class Wall : public MyObject 5 | { 6 | public: 7 | Wall(); 8 | ~Wall(); 9 | void SetArmor(int nArmor); 10 | void SetPosition(int x, int y); 11 | void Draw(CDC* pDC, CRect rct); 12 | CImage m_Brick; 13 | 14 | }; 15 | 16 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/Wood.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include"MyObject.h" 3 | class Wood:public MyObject 4 | { 5 | 6 | Wood(); 7 | ~Wood(); 8 | void SetArmor(int nArmor); 9 | void SetPosition(int x, int y); 10 | void Draw(CDC* pDC, CRect rct); 11 | CImage m_Wood; 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit 10 | 11 | // turns off MFC's hiding of some common and often safely ignored warning messages 12 | #define _AFX_ALL_WARNINGS 13 | 14 | #include // MFC core and standard components 15 | #include // MFC extensions 16 | 17 | 18 | #include // MFC Automation classes 19 | 20 | 21 | 22 | #ifndef _AFX_NO_OLE_SUPPORT 23 | #include // MFC support for Internet Explorer 4 Common Controls 24 | #endif 25 | #ifndef _AFX_NO_AFXCMN_SUPPORT 26 | #include // MFC support for Windows Common Controls 27 | #endif // _AFX_NO_AFXCMN_SUPPORT 28 | 29 | #include // MFC support for ribbons and control bars 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | #ifdef _UNICODE 40 | #if defined _M_IX86 41 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 42 | #elif defined _M_X64 43 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 44 | #else 45 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 46 | #endif 47 | #endif 48 | 49 | 50 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/pch.cpp: -------------------------------------------------------------------------------- 1 | // pch.cpp: source file corresponding to the pre-compiled header 2 | 3 | #include "pch.h" 4 | 5 | // When you are using pre-compiled headers, this source file is necessary for compilation to succeed. 6 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/pch.h: -------------------------------------------------------------------------------- 1 | // pch.h: This is a precompiled header file. 2 | // Files listed below are compiled only once, improving build performance for future builds. 3 | // This also affects IntelliSense performance, including code completion and many code browsing features. 4 | // However, files listed here are ALL re-compiled if any one of them is updated between builds. 5 | // Do not add files here that you will be updating frequently as this negates the performance advantage. 6 | 7 | #ifndef PCH_H 8 | #define PCH_H 9 | 10 | // add headers that you want to pre-compile here 11 | #include "framework.h" 12 | 13 | #endif //PCH_H 14 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/res/MyZhouTank.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/res/MyZhouTank.ico -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/res/MyZhouTank.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/MyZhouTank/res/MyZhouTank.rc2 -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by MyZhouTank.rc 4 | // 5 | #define IDM_ABOUTBOX 0x0010 6 | #define IDD_ABOUTBOX 100 7 | #define IDS_ABOUTBOX 101 8 | #define IDD_MYZHOUTANK_DIALOG 102 9 | #define IDR_MAINFRAME 128 10 | #define IDD_DIALOG_CONFIG 132 11 | #define IDC_BUTTON1 1001 12 | #define IDC_BUTTON2 1002 13 | 14 | // Next default values for new objects 15 | // 16 | #ifdef APSTUDIO_INVOKED 17 | #ifndef APSTUDIO_READONLY_SYMBOLS 18 | #define _APS_NEXT_RESOURCE_VALUE 133 19 | #define _APS_NEXT_COMMAND_VALUE 32771 20 | #define _APS_NEXT_CONTROL_VALUE 1003 21 | #define _APS_NEXT_SYMED_VALUE 101 22 | #endif 23 | #endif 24 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /C++大作业/MyZhouTank/x64/Debug/MyZhouTank.exe.recipe: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | C:\Users\DDA\source\repos\MyZhouTank\x64\Debug\MyZhouTank.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /C++大作业/x64/Debug/MyZhouTank.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/C++大作业/x64/Debug/MyZhouTank.exe -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/Final/FinalExam$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/Final/FinalExam$1.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/Final/FinalExam$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/Final/FinalExam$2.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/Final/FinalExam.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/Final/FinalExam.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/module-info.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/module-info.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/A.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/A.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/ArrayOfStringsExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/ArrayOfStringsExample.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/B.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/B.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/BreakExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/BreakExample.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/C.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/C.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Car.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Car.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/CarDemo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/CarDemo.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Circle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Circle.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/CommonMobilePhone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/CommonMobilePhone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/CommonPhone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/CommonPhone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/ConstructorTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/ConstructorTest.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Dog.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Dog.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/FinalTest$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/FinalTest$1.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/FinalTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/FinalTest.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/FixedPhone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/FixedPhone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/FunnyNumbers.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/FunnyNumbers.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/GuessNumberName.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/GuessNumberName.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/IPPhone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/IPPhone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/IfElseExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/IfElseExample.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/MobilePhone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/MobilePhone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/PersonalHandphoneSystem.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/PersonalHandphoneSystem.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Philosopher.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Philosopher.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Phone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Phone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Rectangle.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Rectangle.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Say_Hello_to_You.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Say_Hello_to_You.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Shape.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Shape.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/ShapeTestWithPolymorphism.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/ShapeTestWithPolymorphism.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Speaker.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Speaker.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Talking.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Talking.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Telephone.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Telephone.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/TrashCar.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/TrashCar.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/WhileExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/WhileExample.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Work3$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Work3$1.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Work3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Work3.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/bin/shixi/Work4.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/bin/shixi/Work4.class -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/beijing.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/beijing.jpeg -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/bianji.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/bianji.png -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/dianzan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/dianzan.png -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/fasong.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/fasong.png -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/shoucang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/shoucang.png -------------------------------------------------------------------------------- /Java网络程序设计大作业/image/sousuo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/image/sousuo.png -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/Final/FinalExam.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/src/Final/FinalExam.java -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/module-info.java: -------------------------------------------------------------------------------- 1 | module shixi { 2 | requires java.desktop; 3 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/ArrayOfStringsExample.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | public class ArrayOfStringsExample { 4 | public static void main(String[] args) { 5 | String[] anArray = { "String One", "String Two", "String Three" }; 6 | for (int i = 0; i <= anArray.length; i++) 7 | { System.out.println(anArray[i].toLowerCase()); 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/BreakExample.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | public class BreakExample { 4 | public static void main(String[] args) { 5 | int[] arrayOfInts = {32, 87, 3, 589, 12, 1076, 2000, 8, 622, 127 }; 6 | int searchfor = 12; int i = 0; 7 | boolean foundIt = false; 8 | for ( i = 0; i < arrayOfInts.length; i++) { 9 | if (arrayOfInts[i] == searchfor) { 10 | foundIt = true; break; 11 | } 12 | } 13 | if (foundIt) { System.out.println("Found " + searchfor + " at index " + i); 14 | } 15 | else { System.out.println(searchfor + "not in the array"); 16 | 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/CarDemo.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | class Car{ 4 | int Speed; 5 | public void push_break(){ 6 | System.out.println("Car break!"); 7 | } 8 | 9 | } 10 | 11 | class TrashCar extends Car{ 12 | double amount; 13 | public void push_break() { 14 | System.out.println("TrashCar break!"); 15 | } 16 | } 17 | public class CarDemo { 18 | public static void main(String args[]) { 19 | Car car=new TrashCar(); 20 | car.push_break(); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/ConstructorTest.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | class A{ 4 | public A() { 5 | System.out.println("String a"); 6 | } 7 | } 8 | 9 | class B extends A{ 10 | 11 | public B() { 12 | System.out.println("String b"); 13 | } 14 | 15 | } 16 | 17 | class C extends B{ 18 | public C() { 19 | System.out.println("String c"); 20 | } 21 | 22 | } 23 | public class ConstructorTest { 24 | 25 | public static void main(String args[]){ 26 | C c= new C(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/FinalTest.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/src/shixi/FinalTest.java -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/FunnyNumbers.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | public class FunnyNumbers { 3 | public static void main(String args[]) { 4 | double largeNum = Math.exp(4000.0); 5 | int posDivZero = 10/0; 6 | double negDivZero = -10.0 / 0.0; 7 | double zeroDivZero = 0.0/0.0; 8 | System.out.println(largeNum); 9 | System.out.println(posDivZero); 10 | System.out.println(negDivZero); 11 | System.out.println(zeroDivZero); 12 | double x=largeNum+posDivZero; 13 | double y=largeNum+negDivZero; 14 | double z=largeNum+zeroDivZero; 15 | System.out.println("x="+x); 16 | System.out.println("y="+y); 17 | System.out.println("z="+z); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/GeneralFunction.java: -------------------------------------------------------------------------------- 1 | 2 | public class GeneralFunction { 3 | 4 | 5 | public static int addUp(int x,int y) { 6 | return x+y; 7 | } 8 | 9 | public static int method() { 10 | int a=9; 11 | int b=10; 12 | int c=GeneralFunction.addUp(a,b); 13 | return c; 14 | } 15 | public static void main(String[] args) { 16 | int c=method(); 17 | System.out.println("c="+c); 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/GuessNumberName.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | import java.util.*; 3 | public class GuessNumberName { 4 | 5 | public static void main(String args[]) { 6 | double m=0; 7 | int i=1; 8 | double n=Math.random()*99+1; 9 | System.out.println("Please enter a number"); 10 | Scanner reader = new Scanner(System.in); 11 | m=reader.nextDouble(); 12 | 13 | while(m!=n) { 14 | if(m>n) { 15 | System.out.println("Your answer is HIGH,try again"); 16 | System.out.println("Please enter a number again"); 17 | m=reader.nextDouble(); 18 | i++; 19 | } 20 | if(m= 90) { grade = 'A'; } 8 | else if (testscore >= 80) { grade = 'B'; } 9 | else if (testscore >= 70) { grade = 'C'; } 10 | else if (testscore >= 60) { grade = 'D'; } 11 | else { grade = 'F'; } 12 | System.out.println("Grade = " + grade); 13 | } 14 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/Say_Hello_to_You.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | import java.io.*; 3 | public class Say_Hello_to_You{ 4 | public static void main (String[] args) 5 | throws IOException{ InputStreamReader reader=new InputStreamReader(System.in); 6 | BufferedReader input=new BufferedReader(reader); 7 | System.out.print("Enter your name:"); 8 | String name=input.readLine(); 9 | System.out.println("Hello,"+ name + "!"); 10 | 11 | } 12 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/ShapeTestWithPolymorphism.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/src/shixi/ShapeTestWithPolymorphism.java -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/Talking.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | interface Speaker{ 4 | public void speak(); 5 | public void announce(String str); 6 | } 7 | 8 | class Philosopher implements Speaker{ 9 | private String philosophy; 10 | public Philosopher(String philosophy) { 11 | this.philosophy = philosophy; 12 | } 13 | public void speak() { 14 | System.out.println(philosophy); 15 | } 16 | 17 | public void announce(String announcement) { 18 | 19 | System.out.println(announcement); 20 | } 21 | public void pontificate() { 22 | for(int count =1;count<=10;count++) { 23 | System.out.println(philosophy); 24 | } 25 | 26 | } 27 | 28 | } 29 | 30 | class Dog implements Speaker{ 31 | 32 | 33 | public void speak() { 34 | System.out.println("woof"); 35 | 36 | } 37 | 38 | 39 | public void announce(String announcement) { 40 | System.out.println("woof:"+announcement); 41 | 42 | } 43 | 44 | } 45 | 46 | public class Talking { 47 | 48 | public static void main(String args[]) { 49 | Speaker current; 50 | current =new Dog(); 51 | current.speak(); 52 | current =new Philosopher("Who am I?"); 53 | current.speak(); 54 | ((Philosopher) current).pontificate(); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/Telephone.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | import java.util.Date; 4 | 5 | abstract class Phone{ 6 | long phoneNumber; 7 | final int local_Call=1; 8 | final int distance_Call=3; 9 | final int international_Call=9; 10 | double balance ; 11 | boolean charge_Mode(int call_Mode) { 12 | return true; 13 | } 14 | double getBalance() { 15 | return balance; 16 | } 17 | } 18 | 19 | class MobilePhone extends Phone{ 20 | String networkType; 21 | } 22 | 23 | class CommonMobilePhone extends MobilePhone{ 24 | 25 | } 26 | 27 | class PersonalHandphoneSystem extends MobilePhone{ 28 | 29 | } 30 | 31 | class FixedPhone extends Phone{ 32 | double monthFee; 33 | } 34 | 35 | class CommonPhone extends FixedPhone{ 36 | boolean longdistanceService; 37 | boolean internationalService; 38 | } 39 | 40 | class IPPhone extends FixedPhone{ 41 | boolean started; 42 | Date expireDate; 43 | } 44 | 45 | 46 | public class Telephone { 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/WhileExample.java: -------------------------------------------------------------------------------- 1 | package shixi; 2 | 3 | public class WhileExample { 4 | public static void main(String[] args) { 5 | String copyFromMe = "Copy this string until you encounter the letter 'u'."; 6 | StringBuffer copyToMe = new StringBuffer(); 7 | int i = 0; 8 | char c = copyFromMe.charAt(i); 9 | while (c != 'u') { 10 | copyToMe.append(c); 11 | c = copyFromMe.charAt(++i); 12 | } 13 | System.out.println(copyToMe); 14 | } 15 | } -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/Work3.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/src/shixi/Work3.java -------------------------------------------------------------------------------- /Java网络程序设计大作业/src/shixi/Work4.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/Java网络程序设计大作业/src/shixi/Work4.java -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WHU-RS-Code-Assignment 2 | 3 | 武汉大学 遥感信息工程学院(遥感院)编程作业 4 | 5 | 包含以下内容: 6 | 7 | * C++大作业(坦克大战) 8 | * Java网络程序设计大作业(文件读写排序) 9 | * WebGIS课间实习(地理信息购物平台) 10 | * 计算机图形学实习(图像绘制) 11 | * 数字图像处理实习(图像处理) 12 | * *其他作业以后传* 13 | 14 | 欢迎Star 15 | 16 | -------------------------------------------------------------------------------- /WebGIS课间实习/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /WebGIS课间实习/README.md: -------------------------------------------------------------------------------- 1 | # 武汉大学遥感学院 网络GIS 课间实习作业 2 | 3 | 地理信息购物平台 实现如下功能: 4 | 5 | * 利用Vue+ElementUI设计网站布局 6 | * 利用Vuex实现满足地图数据服务的产品订购页面(购物车) 7 | * 体验一种基于商业GIS、开源GIS或网络地图API的入门或部分功能 8 | * AJAX技术实现前后端数据交互 9 | * 利用HTML5画布Canvas实现专题地图(统计图表)的绘制(Echarts) 10 | 11 | ## Project setup 12 | ``` 13 | npm install 14 | ``` 15 | 16 | ### Compiles and hot-reloads for development 17 | ``` 18 | npm run serve 19 | ``` 20 | 21 | ### Compiles and minifies for production 22 | ``` 23 | npm run build 24 | ``` 25 | 26 | ### Lints and fixes files 27 | ``` 28 | npm run lint 29 | ``` 30 | 31 | ### Customize configuration 32 | See [Configuration Reference](https://cli.vuejs.org/config/). 33 | -------------------------------------------------------------------------------- /WebGIS课间实习/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /WebGIS课间实习/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WebGIS课间实习/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webgis", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "core-js": "^3.8.3", 12 | "echarts": "^5.4.0", 13 | "element-ui": "^2.15.12", 14 | "jquery": "^3.5.1", 15 | "json2csv": "^5.0.7", 16 | "jsoneditor": "^9.9.2", 17 | "vkbeautify": "^0.99.3", 18 | "vue": "^2.6.14", 19 | "vue-json-editor": "^1.4.3", 20 | "vue-router": "^3.1.3", 21 | "vuex": "^3.1.0", 22 | "x2js": "^3.4.4" 23 | }, 24 | "devDependencies": { 25 | "@babel/core": "^7.12.16", 26 | "@babel/eslint-parser": "^7.12.16", 27 | "@vue/cli-plugin-babel": "~5.0.0", 28 | "@vue/cli-plugin-eslint": "~5.0.0", 29 | "@vue/cli-service": "~5.0.0", 30 | "eslint": "^7.32.0", 31 | "eslint-plugin-vue": "^8.0.3", 32 | "vue-cli-plugin-windicss": "~1.1.6", 33 | "vue-template-compiler": "^2.6.14" 34 | }, 35 | "eslintConfig": { 36 | "root": true, 37 | "env": { 38 | "node": true 39 | }, 40 | "extends": [ 41 | "plugin:vue/essential", 42 | "eslint:recommended" 43 | ], 44 | "parserOptions": { 45 | "parser": "@babel/eslint-parser" 46 | }, 47 | "rules": {} 48 | }, 49 | "browserslist": [ 50 | "> 1%", 51 | "last 2 versions", 52 | "not dead" 53 | ] 54 | } 55 | -------------------------------------------------------------------------------- /WebGIS课间实习/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/public/favicon.ico -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/上海.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/public/img/上海.jpeg -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/北京.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/public/img/北京.jpeg -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/地理信息.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/地理信息平台.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/武汉.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/public/img/武汉.jpeg -------------------------------------------------------------------------------- /WebGIS课间实习/public/img/重庆.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/public/img/重庆.jpeg -------------------------------------------------------------------------------- /WebGIS课间实习/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 12 | 15 |
16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/App.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 54 | 55 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/WebGIS课间实习/src/assets/logo.png -------------------------------------------------------------------------------- /WebGIS课间实习/src/components/China.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 91 | 92 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/components/GoodsList.vue: -------------------------------------------------------------------------------- 1 | 14 | 89 | 120 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/components/ShoppingCart.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 91 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/components/json2xml.vue: -------------------------------------------------------------------------------- 1 | 46 | 215 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from "./router"; 4 | import ElementUI from 'element-ui'; 5 | import 'element-ui/lib/theme-chalk/index.css'; 6 | import 'windi.css' 7 | import * as echarts from "echarts"; 8 | import myStore from './store/' 9 | 10 | 11 | 12 | Vue.prototype.$echarts = echarts; 13 | Vue.use(ElementUI); 14 | Vue.config.productionTip = false 15 | 16 | new Vue({ 17 | router, 18 | store:myStore, 19 | render: h => h(App), 20 | }).$mount('#app') 21 | -------------------------------------------------------------------------------- /WebGIS课间实习/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import VueRouter from "vue-router"; 3 | import Home from '../components/Home.vue' 4 | import Map from '../components/Map.vue' 5 | import ShoppingCart from '../components/ShoppingCart.vue' 6 | import Good from '../components/GoodsList.vue' 7 | import China from '../components/China.vue' 8 | import Json from '../components/json2xml.vue' 9 | import Thematic from '../components/Thematic.vue' 10 | Vue.use(VueRouter); 11 | 12 | const routes = [ 13 | { 14 | path: "/", 15 | name: "Home", 16 | component: Home, 17 | }, 18 | { 19 | path: "/Map", 20 | name: "Map", 21 | component: Map, 22 | }, 23 | { 24 | path: "/Shoppingcart", 25 | name: "Shoppingcart", 26 | component: ShoppingCart, 27 | }, 28 | { 29 | path: "/Goods", 30 | name: "Goods", 31 | component: Good, 32 | }, 33 | { 34 | path: "/China", 35 | name: "China", 36 | component: China, 37 | }, 38 | { 39 | path: "/Json2xml", 40 | name: "Json2xml", 41 | component: Json, 42 | }, 43 | { 44 | path: "/Thematic", 45 | name: "Thematic", 46 | component: Thematic, 47 | }, 48 | ]; 49 | 50 | const router = new VueRouter({ 51 | routes, 52 | }); 53 | 54 | 55 | export default router; -------------------------------------------------------------------------------- /WebGIS课间实习/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | Vue.use(Vuex) //Vue.propertype.$store = xxx 4 | 5 | const moduleA = { 6 | // 状态就是数据 7 | state:{ 8 | goodsList:JSON.parse(localStorage.getItem('cartList') || '[]') // 商品列表,刚开始为空 9 | }, 10 | // Vuex中的getters 和Vue中filter、computed都是需要返回值 11 | getters:{ 12 | /** 13 | * 这里面的参数必须是state 14 | * 15 | * 第一次使用的会执行 16 | * 后面当我们 getTotalCount 中 使用/依赖的数据发生了变化 17 | */ 18 | getTotalCount(state){ 19 | console.log("----------------------") 20 | let totalCount = 0 21 | state.goodsList.forEach(item=>{ 22 | totalCount += item.num 23 | }) 24 | 25 | return totalCount 26 | }, 27 | getGoodsList(state){ 28 | return state.goodsList 29 | } 30 | }, 31 | //mutations 32 | mutations:{ 33 | /** 34 | * state 就是固定写法,它代表的就是上面state对象 35 | * 36 | * 参数1:state对象,这个必须放在第一个位置 37 | * 参数2:载荷 38 | * 39 | * 40 | * 这个地方需要处理一下,如果添加的商品 state.goodsList 存在 41 | * 就在之前的那个对象上把数量加起来 42 | * 43 | * 如果没有,再push条新的 44 | */ 45 | addGoods(state,goods){ 46 | // oldGoods,就是第一次添加进去的那个对象 47 | const oldGoods = state.goodsList.find(item=>item.id === goods.id) 48 | 49 | if (oldGoods) { //找到了,之前存在过 50 | oldGoods.num += goods.num 51 | } else { // 没找到,直接新增 52 | state.goodsList.push(goods) 53 | } 54 | //ES6 如何从对象中,找到某个元素 55 | // console.log(state.goodsList) 56 | } 57 | }, 58 | actions:{ 59 | /** 60 | asyncAddGoods(context,goods){ 61 | // 模拟耗时间操作 62 | setTimeout(() => { 63 | context.commit('addGoods',goods) 64 | }, 3000); 65 | } 66 | */ 67 | asyncAddGoods({commit},goods){ 68 | // 模拟耗时间操作 69 | setTimeout(() => { 70 | commit('addGoods',goods) 71 | }, 1000); 72 | } 73 | } 74 | } 75 | 76 | const orderModule = { 77 | state:{ 78 | orderList:[] 79 | } 80 | } 81 | 82 | // 使用了module 83 | /** 84 | const store = new Vuex.Store({ 85 | modules:{ 86 | cart:moduleA, 87 | order:orderModule 88 | } 89 | }) 90 | */ 91 | 92 | // 没有使用module 93 | const store = new Vuex.Store({ 94 | // 状态就是数据 95 | state:{ 96 | goodsList:JSON.parse(localStorage.getItem('cartList') || '[]'), // 商品列表,刚开始为空 97 | }, 98 | // Vuex中的getters 和Vue中filter、computed都是需要返回值 99 | getters:{ 100 | /** 101 | * 这里面的参数必须是state 102 | * 103 | * 第一次使用的会执行 104 | * 后面当我们 getTotalCount 中 使用/依赖的数据发生了变化 105 | */ 106 | getTotalCount(state){ 107 | console.log("----------------------") 108 | let totalCount = 0 109 | state.goodsList.forEach(item=>{ 110 | totalCount += item.num 111 | }) 112 | 113 | return totalCount 114 | }, 115 | getGoodsList(state){ 116 | return state.goodsList 117 | } 118 | }, 119 | //mutations 120 | mutations:{ 121 | /** 122 | * state 就是固定写法,它代表的就是上面state对象 123 | * 124 | * 参数1:state对象,这个必须放在第一个位置 125 | * 参数2:载荷 126 | * 127 | * 128 | * 这个地方需要处理一下,如果添加的商品 state.goodsList 存在 129 | * 就在之前的那个对象上把数量加起来 130 | * 131 | * 如果没有,再push条新的 132 | */ 133 | addGoods(state,goods){ 134 | // oldGoods,就是第一次添加进去的那个对象 135 | const oldGoods = state.goodsList.find(item=>item.id === goods.id) 136 | 137 | if (oldGoods) { //找到了,之前存在过 138 | oldGoods.num += goods.num 139 | } else { // 没找到,直接新增 140 | state.goodsList.push(goods) 141 | } 142 | //ES6 如何从对象中,找到某个元素 143 | // console.log(state.goodsList) 144 | } 145 | }, 146 | actions:{ 147 | asyncAddGoods(context,goods){ 148 | // console.log(context) 149 | // 模拟耗时间操作 150 | setTimeout(() => { 151 | context.commit('addGoods',goods) 152 | }, 1000); 153 | } 154 | /* 155 | asyncAddGoods({commit},goods){ 156 | // console.log(goods) 157 | // 模拟耗时间操作 158 | setTimeout(() => { 159 | // 在这个调用之前需要做耗时间操作的时候 160 | commit('addGoods',goods) 161 | }, 3000); 162 | } 163 | */ 164 | } 165 | }) 166 | 167 | window.onbeforeunload = function(){ 168 | // 保存到本地 169 | window.localStorage.setItem('cartList',JSON.stringify(store.getters.getGoodsList)) 170 | } 171 | 172 | export default store -------------------------------------------------------------------------------- /WebGIS课间实习/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require('@vue/cli-service') 2 | module.exports = defineConfig({ 3 | transpileDependencies: true, 4 | lintOnSave: false, 5 | pluginOptions: { 6 | windicss: { 7 | // 具体配置请查看 https://github.com/windicss/vite-plugin-windicss/blob/main/packages/plugin-utils/src/options.ts 8 | } 9 | }, 10 | configureWebpack: { 11 | externals: { 12 | BMap: "BMap", 13 | BMap_Symbol_SHAPE_POINT: "BMap_Symbol_SHAPE_POINT", 14 | }, 15 | }, 16 | }) 17 | -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31205.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "opencvtest", "opencvtest\opencvtest.vcxproj", "{761D58D7-BE22-4502-BDD9-774A9730C6F8}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Debug|x64.ActiveCfg = Debug|x64 17 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Debug|x64.Build.0 = Debug|x64 18 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Debug|x86.ActiveCfg = Debug|Win32 19 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Debug|x86.Build.0 = Debug|Win32 20 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Release|x64.ActiveCfg = Release|x64 21 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Release|x64.Build.0 = Release|x64 22 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Release|x86.ActiveCfg = Release|Win32 23 | {761D58D7-BE22-4502-BDD9-774A9730C6F8}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {380E353E-8E83-478C-90BB-D3254705FC1E} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数字图像处理实习/opencvtest/1.jpg -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数字图像处理实习/opencvtest/2.bmp -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/3.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数字图像处理实习/opencvtest/3.bmp -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/4.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数字图像处理实习/opencvtest/4.bmp -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/opencvtest.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {761d58d7-be22-4502-bdd9-774a9730c6f8} 25 | opencvtest 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v142 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v142 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v142 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v142 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | false 78 | 79 | 80 | true 81 | C:\opencv\build\include;C:\opencv\build\include\opencv;C:\opencv\build\include\opencv2;$(IncludePath) 82 | C:\opencv\build\x64\vc15\lib;$(LibraryPath) 83 | 84 | 85 | false 86 | 87 | 88 | 89 | Level3 90 | true 91 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 92 | true 93 | 94 | 95 | Console 96 | true 97 | 98 | 99 | 100 | 101 | Level3 102 | true 103 | true 104 | true 105 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 106 | true 107 | 108 | 109 | Console 110 | true 111 | true 112 | true 113 | 114 | 115 | 116 | 117 | Level3 118 | true 119 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 120 | true 121 | 122 | 123 | Console 124 | true 125 | opencv_world341d.lib;opencv_world341.lib;%(AdditionalDependencies) 126 | 127 | 128 | 129 | 130 | Level3 131 | true 132 | true 133 | true 134 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 135 | true 136 | 137 | 138 | Console 139 | true 140 | true 141 | true 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/opencvtest.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 源文件 20 | 21 | 22 | -------------------------------------------------------------------------------- /数字图像处理实习/opencvtest/opencvtest.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31205.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DIJKSTRA TEST", "DIJKSTRA TEST\DIJKSTRA TEST.vcxproj", "{A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Debug|x64.ActiveCfg = Debug|x64 17 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Debug|x64.Build.0 = Debug|x64 18 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Debug|x86.ActiveCfg = Debug|Win32 19 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Debug|x86.Build.0 = Debug|Win32 20 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Release|x64.ActiveCfg = Release|x64 21 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Release|x64.Build.0 = Release|x64 22 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Release|x86.ActiveCfg = Release|Win32 23 | {A1B14DB8-CE1F-4F46-AFAC-12AE06736FA5}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {155860A5-7A6E-4E76-9228-0E68EC0E4340} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/DIJKSTRA TEST.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数据结构实习/DIJKSTRA TEST/DIJKSTRA TEST.cpp -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/DIJKSTRA TEST.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 16.0 23 | Win32Proj 24 | {a1b14db8-ce1f-4f46-afac-12ae06736fa5} 25 | DIJKSTRATEST 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v142 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v142 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v142 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v142 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | true 75 | 76 | 77 | false 78 | 79 | 80 | true 81 | 82 | 83 | false 84 | 85 | 86 | 87 | Level3 88 | false 89 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 90 | true 91 | 92 | 93 | Console 94 | true 95 | 20000000 96 | 97 | 98 | 99 | 100 | Level3 101 | true 102 | true 103 | true 104 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 105 | true 106 | 107 | 108 | Console 109 | true 110 | true 111 | true 112 | 113 | 114 | 115 | 116 | Level3 117 | true 118 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 119 | true 120 | 121 | 122 | Console 123 | true 124 | 125 | 126 | 127 | 128 | Level3 129 | true 130 | true 131 | true 132 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 133 | true 134 | 135 | 136 | Console 137 | true 138 | true 139 | true 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/DIJKSTRA TEST.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/DIJKSTRA TEST.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/cities.csv: -------------------------------------------------------------------------------- 1 | Afghanistan,Kabul,34.4667,69.1833 2 | Albania,Tirane,41.3,19.8167 3 | Algeria,Algiers,36.7,3.13333 4 | American Samoa,Pago Pago,-14.2667,-170.717 5 | Andorra,Andorra la Vella,42.5167,1.53333 6 | Angola,Luanda,-8.83333,13.25 7 | Antigua and Barbuda,W. Indies,17.3333,-61.8 8 | Argentina,Buenos Aires,-36.5,-60 9 | Armenia,Yerevan,40.1667,44.5167 10 | Aruba,Oranjestad,12.5333,-70.0333 11 | Australia,Canberra (Use Sydney),-35.25,149.133 12 | Austria,Vienna,48.2,16.3667 13 | Azerbaijan,Baku,40.4833,49.9333 14 | Bahamas,Nassau,25.0833,-77.3333 15 | Bahrain,Manama,26.1667,50.5 16 | Bangladesh,Dhaka,23.7167,90.4333 17 | Barbados,Bridgetown,13.0833,-59.5 18 | Belarus,Minsk,53.8667,27.5 19 | Belgium,Brussels,50.85,4.35 20 | Belize,Belmopan,17.3,-88.5 21 | Benin,Porto-Novo,6.38333,2.7 22 | Bhutan,Thimphu,27.5167,89.75 23 | Bolivia,La Paz,-16.3333,-68.1667 24 | Bosnia and Herzegovina,Sarajevo,43.8667,18.4333 25 | Botswana,Gaborone,-24.75,25.95 26 | Brazil,Brasilia,-15.7833,-47.9167 27 | British Virgin Islands,Road Town,18.45,-64.6167 28 | Brunei Darussalam,Bandar Seri Begawan,4.86667,115 29 | Bulgaria,Sofia,42.75,23.3333 30 | Burkina Faso,Ouagadougou,12.25,-1.5 31 | Burundi,Bujumbura,-3.26667,29.3 32 | Cambodia,Phnom Penh,11.55,104.917 33 | Cameroon,Yaounde,3.83333,11.5833 34 | Canada,Ottawa,45.45,-75.7 35 | Cape Verde,Praia,15.0333,-23.5667 36 | Cayman Islands,George Town,19.3333,-81.4 37 | Central African Republic,Bangui,4.38333,18.5833 38 | Chad,N'Djamena,12.1667,14.9833 39 | Chile,Santiago,-33.4,-70.6667 40 | China,Beijing,39.9167,116.333 41 | Colombia,Bogota,4.56667,-74 42 | Comros,Moroni,-11.6667,43.2667 43 | Congo,Brazzaville,-4.15,15.2 44 | Costa Rica,San Jose,9.91667,-84.0333 45 | Cote d'Ivoire,Yamoussoukro,6.81667,-5.28333 46 | Croatia,Zagreb,45.8333,15.9667 47 | Cuba,Havana,23.1333,-82.3667 48 | Cyprus,Nicosia,35.1667,33.4167 49 | Czech Republic,Prague,50.0833,14.3667 50 | Democratic People's Republic of,P'yongyang,39.15,125.5 51 | Democratic Republic of the Congo,Kinshasa,-4.33333,15.25 52 | Denmark,Copenhagen,55.6833,12.5667 53 | Djibouti,Djibouti,11.1333,42.3333 54 | Dominica,Roseau,15.3333,-61.4 55 | Dominica Republic,Santo Domingo,18.5,-69.9833 56 | East Timor,Dili,-8.48333,125.567 57 | Ecuador,Quito,-0.25,-78.5833 58 | Egypt,Cairo,30.0167,31.2333 59 | El Salvador,San Salvador,13.6667,-89.1667 60 | Equatorial Guinea,Malabo,3.75,8.83333 61 | Eritrea,Asmara,15.3167,38.9167 62 | Estonia,Tallinn,59.3667,24.8 63 | Ethiopia,Addis Ababa,9.03333,38.7 64 | Falkland Islands (Malvinas),Stanley,-51.6667,-59.85 65 | Faroe Islands,Torshavn,62.0833,-6.93333 66 | Fiji,Suva,-18.1,178.5 67 | Finland,Helsinki,60.25,25.05 68 | France,Paris,48.8333,2.33333 69 | French Guiana,Cayenne,5.08333,-52.3 70 | French Polynesia,Papeete,-17.5333,-149.567 71 | Gabon,Libreville,0.416667,9.43333 72 | Gambia,Banjul,13.4667,-16.6667 73 | Georgia,T'bilisi,41.7167,44.8333 74 | Germany,Berlin,52.5,13.4167 75 | Ghana,Accra,5.58333,-0.1 76 | Greece,Athens,37.9667,23.7667 77 | Greenland,Nuuk,64.1667,-51.5833 78 | Guadeloupe,Basse-Terre,16,-61.7333 79 | Guatemala,Guatemala,14.6667,-90.3667 80 | Guernsey,St. Peter Port,49.4333,-2.55 81 | Guinea,Conakry,9.48333,-13.8167 82 | Guinea-Bissau,Bissau,11.75,-15.75 83 | Guyana,Georgetown,6.83333,-58.2 84 | Haiti,Port-au-Prince,18.6667,-72.3333 85 | Honduras,Tegucigalpa,14.0833,-87.2333 86 | Hungary,Budapest,47.4833,19.0833 87 | Iceland,Reykjavik,64.1667,-21.95 88 | India,New Delhi,28.6167,77.2167 89 | Indonesia,Jakarta,-6.15,106.817 90 | Iran (Islamic Republic of),Tehran,35.7333,51.5 91 | Iraq,Baghdad,33.3333,44.5 92 | Ireland,Dublin,53.35,-6.25 93 | Israel,Jerusalem,31.7833,35.2 94 | Italy,Rome,41.9,12.4833 95 | Jamaica,Kingston,18,-76.8333 96 | Japan,Tokyo,35.682,139.69 97 | Jordan,Amman,31.95,35.8667 98 | Kazakhstan,Astana,51.1667,71.5 99 | Kenya,Nairobi,-1.28333,36.8 100 | Kiribati,Tarawa,1.5,173 101 | Kuwait,Kuwait,29.5,48 102 | Kyrgyzstan,Bishkek,42.9,74.7667 103 | Lao People@s Democratic Republic,Vientiane,17.9667,102.6 104 | Latvia,Riga,56.8833,24.1333 105 | Lebanon,Beirut,33.8833,35.5167 106 | Lesotho,Maseru,-29.3,27.5 107 | Liberia,Monrovia,6.3,-10.7833 108 | Libyan Arab Jamahiriya,Tripoli,32.8167,13.1167 109 | Liechtenstein,Vaduz,47.1333,9.51667 110 | Lithuania,Vilnius,54.6333,25.3167 111 | Luxembourg,Luxembourg,49.6167,6.15 112 | Madagascar,Antananarivo,-18.9167,47.5167 113 | Malawi,Lilongwe,-14,33.8 114 | Malaysia,Kuala Lumpur,3.15,101.683 115 | Maldives,Male,4,73.4667 116 | Mali,Bamako,12.5667,-7.91667 117 | Malta,Valletta,35.9,14.5167 118 | Martinique,Fort-de-France,14.6,-61.0333 119 | Mauritania,Nouakchott,-20.1667,57.5 120 | Mayotte,Mamoudzou,-12.8,45.2333 121 | Mexico,Mexico,19.3333,-99.1667 122 | Micronesia (Federated States of),Palikir,6.91667,158.15 123 | Moldova (Republic of),Chisinau ,47.025,28.839 124 | Mozambique,Maputo,-25.9667,32.5333 125 | Myanmar,Yangon,16.75,96.3333 126 | Namibia,Windhoek,-22.5833,17.0667 127 | Nepal,Kathmandu,27.75,85.3333 128 | Netherlands,Amsterdam,52.3833,4.9 129 | Netherlands Antilles,Willemstad,12.0833,-69 130 | New Caledonia,Noumea,-22.2833,166.5 131 | New Zealand,Wellington,-41.3167,174.767 132 | Nicaragua,Managua,12.1,-86.3333 133 | Niger,Niamey,13.45,2.1 134 | Nigeria,Abuja,9.08333,7.53333 135 | Northern Mariana Islands,Saipan,15.2,145.75 136 | Norway,Oslo,59.9167,10.75 137 | Oman,Masqat,23.6167,58.6 138 | Pakistan,Islamabad,33.6667,73.1667 139 | Palau,Koror,7.33333,134.467 140 | Panama,Panama,9,-79.4167 141 | Papua New Guinea,Port Moresby,-9.4,147.133 142 | Paraguay,Asuncion,-25.1667,-57.5 143 | Peru,Lima,-12,-77 144 | Philippines,Manila,14.6667,121.05 145 | Poland,Warsaw,52.2167,21 146 | Portugal,Lisbon,38.7,-9.16667 147 | Puerto Rico,San Juan,18.4667,-66.1167 148 | Qatar,Doha,25.25,51.5833 149 | Republic of Korea,Seoul,37.5167,126.967 150 | Romania,Bucuresti,44.45,26.1667 151 | Russian Federation,Moskva,55.75,37.5833 152 | Rwanda,Kigali,-1.98333,30.0667 153 | Saint Kitts and Nevis,Basseterre,17.2833,-62.7167 154 | Saint Lucia,Castries,14.0333,-60.9667 155 | Saint Pierre and Miquelon,Saint-Pierre,46.7667,-56.2 156 | Saint vincent and the Grenadines,Kingstown,13.1667,-61.1667 157 | Samoa,Apia,-13.8333,-171.833 158 | San Marino,San Marino,43.9167,12.5 159 | Sao Tome and Principe,Sao Tome,0.166667,6.65 160 | Saudi Arabia,Riyadh,24.6833,46.7 161 | Senegal,Dakar,14.5667,-17.4833 162 | Sierra Leone,Freetown,8.5,-13.2833 163 | Singapore,Singapore,1.281,103.852 164 | Slovakia,Bratislava,48.1667,17.1167 165 | Slovenia,Ljubljana,46.0667,14.55 166 | Solomon Islands,Honiara,-9.45,159.95 167 | Somalia,Mogadishu,2.03333,45.4167 168 | South Africa,Pretoria (Use Johannesburg),-25.7333,28.2 169 | Spain,Madrid,40.4167,-3.75 170 | Sudan,Khartoum,15.5167,32.5833 171 | Suriname,Paramaribo,5.83333,-55.1667 172 | Swaziland,Mbabane,-26.3,31.1 173 | Sweden,Stockholm,59.3333,18.05 174 | Switzerland,Bern,46.95,7.46667 175 | Syrian Arab Republic,Damascus,33.5,36.3 176 | Tajikistan,Dushanbe,38.55,68.8 177 | Thailand,Bangkok,13.75,100.583 178 | The Former Yugoslav Republic of Macedonia,Skopje,42.0167,21.4333 179 | Togo,Lome,6.15,1.33333 180 | Tonga,Nuku'alofa,-21.1667,-174 181 | Tunisia,Tunis,36.8333,10.1833 182 | Turkey,Ankara,39.95,32.9 183 | Turkmenistan,Ashgabat,38,57.8333 184 | Tuvalu,Funafuti,-8.51667,179.217 185 | Uganda,Kampala,0.333333,32.5 186 | Ukraine,Kiev,50.5,30.4667 187 | United Arab Emirates,Abu Dhabi,24.4667,54.3667 188 | United Kingdom of Great Britain and Northern Ireland,London,51.6,-0.0833333 189 | United Republic of Tanzania,Dodoma,-6.13333,35.75 190 | United States of America,Washington DC,38.895,-77.038 191 | United States of Virgin Islands,Charlotte Amalie,18.35,-64.9333 192 | Uruguay,Montevideo,-34.8333,-56.1833 193 | Uzbekistan,Tashkent,41.3333,69.1667 194 | Vanuatu,Port-Vila,-17.75,168.3 195 | Venezuela,Caracas,10.5,-66.9167 196 | Vietnam,Hanoi,21.0833,105.917 197 | Yugoslavia,Belgrade,44.8333,20.6167 198 | Zambia,Lusaka,-15.4667,28.2667 199 | Zimbabwe,Harare,-17.7167,31.0333 200 | -------------------------------------------------------------------------------- /数据结构实习/DIJKSTRA TEST/graph.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/数据结构实习/DIJKSTRA TEST/graph.htm -------------------------------------------------------------------------------- /数据结构实习/README.md: -------------------------------------------------------------------------------- 1 | # WHU-RS-DataStructure-Djikstra 2 | 武汉大学遥感院的数据结构集中实习,实现Djikstra算法 3 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.31205.134 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ComputerGraphicDDA", "ComputerGraphicDDA\ComputerGraphicDDA.vcxproj", "{92D74F9A-B252-448E-861B-A2C201A42196}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {92D74F9A-B252-448E-861B-A2C201A42196}.Debug|x64.ActiveCfg = Debug|x64 17 | {92D74F9A-B252-448E-861B-A2C201A42196}.Debug|x64.Build.0 = Debug|x64 18 | {92D74F9A-B252-448E-861B-A2C201A42196}.Debug|x86.ActiveCfg = Debug|Win32 19 | {92D74F9A-B252-448E-861B-A2C201A42196}.Debug|x86.Build.0 = Debug|Win32 20 | {92D74F9A-B252-448E-861B-A2C201A42196}.Release|x64.ActiveCfg = Release|x64 21 | {92D74F9A-B252-448E-861B-A2C201A42196}.Release|x64.Build.0 = Release|x64 22 | {92D74F9A-B252-448E-861B-A2C201A42196}.Release|x86.ActiveCfg = Release|Win32 23 | {92D74F9A-B252-448E-861B-A2C201A42196}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {F28DF483-6B6F-49C3-82C7-DC7C4B836899} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/CObject3D.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "CObject3D.h" 3 | 4 | void CObject3D::CreateBall(double x0, double y0, double z0, double r) 5 | { 6 | int i = 0, j; 7 | double pi = 3.1415926; 8 | bx = x0;by = y0;bz = z0; 9 | for (double u = -pi / 2;u < pi / 2 + pi / 32;u = u + pi / 32) 10 | { 11 | j = 0; 12 | for (double v = 0;v < 2 * pi - pi / 32;v = v + pi / 32) 13 | { 14 | p3d[i][j].x = x0 + r * cos(u) * cos(v); 15 | p3d[i][j].y = y0 + r * cos(u) * sin(v); 16 | p3d[i][j].z = z0 + r * sin(u); 17 | j++; 18 | } 19 | i++; 20 | } 21 | countx = i; 22 | county = j; 23 | SetSurfaceList(); 24 | 25 | } 26 | 27 | void CObject3D::SetSurfaceList() 28 | { 29 | for (int i = 0;i < countx - 1;i++) 30 | { 31 | for (int j = 0;j < county;j++) 32 | { 33 | TriSurface surface1; 34 | surface1.p1 = p3d[i][j]; 35 | surface1.p2 = p3d[(i + 1) % countx][(j + 1) % county]; 36 | surface1.p3 = p3d[(i + 1) % countx][j]; 37 | SetFVector(&surface1); 38 | m_SurfaceList.Add(surface1); 39 | TriSurface surface2; 40 | surface2.p1 = p3d[i][j]; 41 | surface2.p2 = p3d[i][(j + 1) % county]; 42 | surface2.p3 = p3d[(i + 1) % countx][(j + 1) % county]; 43 | SetFVector(&surface2); 44 | m_SurfaceList.Add(surface2); 45 | } 46 | } 47 | 48 | } 49 | 50 | void CObject3D::SetFVector(TriSurface* surface) 51 | { 52 | double xu, yu, zu, xv, yv, zv, d; 53 | xu = surface->p2.x - surface->p1.x; 54 | yu = surface->p2.y - surface->p1.y; 55 | zu = surface->p2.z - surface->p1.z; 56 | xv = surface->p3.x - surface->p1.x; 57 | yv = surface->p3.y - surface->p1.y; 58 | zv = surface->p3.z - surface->p1.z; 59 | d = sqrt((yu * zv - yv * zu) * (yu * zv - yv * zu) + 60 | (zu * xv - zv * xu) * (zu * xv - zv * xu) + 61 | (xu * yv - xv * yu) * (xu * yv - xv * yu)); 62 | surface->xn = (yu * zv - yv * zu) / d; 63 | surface->yn = (zu * xv - zv * xu) / d; 64 | surface->zn = (xu * yv - xv * yu) / d; 65 | 66 | } 67 | 68 | void CObject3D::SetParam(Param param) 69 | { 70 | m_Param.kra = param.kra; 71 | m_Param.kga = param.kga; 72 | m_Param.kba = param.kba; 73 | m_Param.krd = param.krd; 74 | m_Param.kgd = param.kgd; 75 | m_Param.kbd = param.kbd; 76 | m_Param.krs = param.krs; 77 | m_Param.kgs = param.kgs; 78 | m_Param.kbs = param.kbs; 79 | m_Param.n = param.n; 80 | 81 | } 82 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/CObject3D.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/CObject3D.h -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/CReality.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/CReality.cpp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/CReality.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/CReality.h -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ClassView.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "pch.h" 3 | #include "framework.h" 4 | #include "MainFrm.h" 5 | #include "ClassView.h" 6 | #include "Resource.h" 7 | #include "ComputerGraphicDDA.h" 8 | 9 | class CClassViewMenuButton : public CMFCToolBarMenuButton 10 | { 11 | friend class CClassView; 12 | 13 | DECLARE_SERIAL(CClassViewMenuButton) 14 | 15 | public: 16 | CClassViewMenuButton(HMENU hMenu = nullptr) noexcept : CMFCToolBarMenuButton((UINT)-1, hMenu, -1) 17 | { 18 | } 19 | 20 | virtual void OnDraw(CDC* pDC, const CRect& rect, CMFCToolBarImages* pImages, BOOL bHorz = TRUE, 21 | BOOL bCustomizeMode = FALSE, BOOL bHighlight = FALSE, BOOL bDrawBorder = TRUE, BOOL bGrayDisabledButtons = TRUE) 22 | { 23 | pImages = CMFCToolBar::GetImages(); 24 | 25 | CAfxDrawState ds; 26 | pImages->PrepareDrawImage(ds); 27 | 28 | CMFCToolBarMenuButton::OnDraw(pDC, rect, pImages, bHorz, bCustomizeMode, bHighlight, bDrawBorder, bGrayDisabledButtons); 29 | 30 | pImages->EndDrawImage(ds); 31 | } 32 | }; 33 | 34 | IMPLEMENT_SERIAL(CClassViewMenuButton, CMFCToolBarMenuButton, 1) 35 | 36 | ////////////////////////////////////////////////////////////////////// 37 | // 构造/析构 38 | ////////////////////////////////////////////////////////////////////// 39 | 40 | CClassView::CClassView() noexcept 41 | { 42 | m_nCurrSort = ID_SORTING_GROUPBYTYPE; 43 | } 44 | 45 | CClassView::~CClassView() 46 | { 47 | } 48 | 49 | BEGIN_MESSAGE_MAP(CClassView, CDockablePane) 50 | ON_WM_CREATE() 51 | ON_WM_SIZE() 52 | ON_WM_CONTEXTMENU() 53 | ON_COMMAND(ID_CLASS_ADD_MEMBER_FUNCTION, OnClassAddMemberFunction) 54 | ON_COMMAND(ID_CLASS_ADD_MEMBER_VARIABLE, OnClassAddMemberVariable) 55 | ON_COMMAND(ID_CLASS_DEFINITION, OnClassDefinition) 56 | ON_COMMAND(ID_CLASS_PROPERTIES, OnClassProperties) 57 | ON_COMMAND(ID_NEW_FOLDER, OnNewFolder) 58 | ON_WM_PAINT() 59 | ON_WM_SETFOCUS() 60 | ON_COMMAND_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnSort) 61 | ON_UPDATE_COMMAND_UI_RANGE(ID_SORTING_GROUPBYTYPE, ID_SORTING_SORTBYACCESS, OnUpdateSort) 62 | END_MESSAGE_MAP() 63 | 64 | ///////////////////////////////////////////////////////////////////////////// 65 | // CClassView 消息处理程序 66 | 67 | int CClassView::OnCreate(LPCREATESTRUCT lpCreateStruct) 68 | { 69 | if (CDockablePane::OnCreate(lpCreateStruct) == -1) 70 | return -1; 71 | 72 | CRect rectDummy; 73 | rectDummy.SetRectEmpty(); 74 | 75 | // 创建视图: 76 | const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; 77 | 78 | if (!m_wndClassView.Create(dwViewStyle, rectDummy, this, 2)) 79 | { 80 | TRACE0("未能创建类视图\n"); 81 | return -1; // 未能创建 82 | } 83 | 84 | // 加载图像: 85 | m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_SORT); 86 | m_wndToolBar.LoadToolBar(IDR_SORT, 0, 0, TRUE /* 已锁定*/); 87 | 88 | OnChangeVisualStyle(); 89 | 90 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); 91 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); 92 | 93 | m_wndToolBar.SetOwner(this); 94 | 95 | // 所有命令将通过此控件路由,而不是通过主框架路由: 96 | m_wndToolBar.SetRouteCommandsViaFrame(FALSE); 97 | 98 | CMenu menuSort; 99 | menuSort.LoadMenu(IDR_POPUP_SORT); 100 | 101 | m_wndToolBar.ReplaceButton(ID_SORT_MENU, CClassViewMenuButton(menuSort.GetSubMenu(0)->GetSafeHmenu())); 102 | 103 | CClassViewMenuButton* pButton = DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0)); 104 | 105 | if (pButton != nullptr) 106 | { 107 | pButton->m_bText = FALSE; 108 | pButton->m_bImage = TRUE; 109 | pButton->SetImage(GetCmdMgr()->GetCmdImage(m_nCurrSort)); 110 | pButton->SetMessageWnd(this); 111 | } 112 | 113 | // 填入一些静态树视图数据(此处只需填入虚拟代码,而不是复杂的数据) 114 | FillClassView(); 115 | 116 | return 0; 117 | } 118 | 119 | void CClassView::OnSize(UINT nType, int cx, int cy) 120 | { 121 | CDockablePane::OnSize(nType, cx, cy); 122 | AdjustLayout(); 123 | } 124 | 125 | void CClassView::FillClassView() 126 | { 127 | HTREEITEM hRoot = m_wndClassView.InsertItem(_T("FakeApp 类"), 0, 0); 128 | m_wndClassView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD); 129 | 130 | HTREEITEM hClass = m_wndClassView.InsertItem(_T("CFakeAboutDlg"), 1, 1, hRoot); 131 | m_wndClassView.InsertItem(_T("CFakeAboutDlg()"), 3, 3, hClass); 132 | 133 | m_wndClassView.Expand(hRoot, TVE_EXPAND); 134 | 135 | hClass = m_wndClassView.InsertItem(_T("CFakeApp"), 1, 1, hRoot); 136 | m_wndClassView.InsertItem(_T("CFakeApp()"), 3, 3, hClass); 137 | m_wndClassView.InsertItem(_T("InitInstance()"), 3, 3, hClass); 138 | m_wndClassView.InsertItem(_T("OnAppAbout()"), 3, 3, hClass); 139 | 140 | hClass = m_wndClassView.InsertItem(_T("CFakeAppDoc"), 1, 1, hRoot); 141 | m_wndClassView.InsertItem(_T("CFakeAppDoc()"), 4, 4, hClass); 142 | m_wndClassView.InsertItem(_T("~CFakeAppDoc()"), 3, 3, hClass); 143 | m_wndClassView.InsertItem(_T("OnNewDocument()"), 3, 3, hClass); 144 | 145 | hClass = m_wndClassView.InsertItem(_T("CFakeAppView"), 1, 1, hRoot); 146 | m_wndClassView.InsertItem(_T("CFakeAppView()"), 4, 4, hClass); 147 | m_wndClassView.InsertItem(_T("~CFakeAppView()"), 3, 3, hClass); 148 | m_wndClassView.InsertItem(_T("GetDocument()"), 3, 3, hClass); 149 | m_wndClassView.Expand(hClass, TVE_EXPAND); 150 | 151 | hClass = m_wndClassView.InsertItem(_T("CFakeAppFrame"), 1, 1, hRoot); 152 | m_wndClassView.InsertItem(_T("CFakeAppFrame()"), 3, 3, hClass); 153 | m_wndClassView.InsertItem(_T("~CFakeAppFrame()"), 3, 3, hClass); 154 | m_wndClassView.InsertItem(_T("m_wndMenuBar"), 6, 6, hClass); 155 | m_wndClassView.InsertItem(_T("m_wndToolBar"), 6, 6, hClass); 156 | m_wndClassView.InsertItem(_T("m_wndStatusBar"), 6, 6, hClass); 157 | 158 | hClass = m_wndClassView.InsertItem(_T("Globals"), 2, 2, hRoot); 159 | m_wndClassView.InsertItem(_T("theFakeApp"), 5, 5, hClass); 160 | m_wndClassView.Expand(hClass, TVE_EXPAND); 161 | } 162 | 163 | void CClassView::OnContextMenu(CWnd* pWnd, CPoint point) 164 | { 165 | CTreeCtrl* pWndTree = (CTreeCtrl*)&m_wndClassView; 166 | ASSERT_VALID(pWndTree); 167 | 168 | if (pWnd != pWndTree) 169 | { 170 | CDockablePane::OnContextMenu(pWnd, point); 171 | return; 172 | } 173 | 174 | if (point != CPoint(-1, -1)) 175 | { 176 | // 选择已单击的项: 177 | CPoint ptTree = point; 178 | pWndTree->ScreenToClient(&ptTree); 179 | 180 | UINT flags = 0; 181 | HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags); 182 | if (hTreeItem != nullptr) 183 | { 184 | pWndTree->SelectItem(hTreeItem); 185 | } 186 | } 187 | 188 | pWndTree->SetFocus(); 189 | CMenu menu; 190 | menu.LoadMenu(IDR_POPUP_SORT); 191 | 192 | CMenu* pSumMenu = menu.GetSubMenu(0); 193 | 194 | if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx))) 195 | { 196 | CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu; 197 | 198 | if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE)) 199 | return; 200 | 201 | ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu); 202 | UpdateDialogControls(this, FALSE); 203 | } 204 | } 205 | 206 | void CClassView::AdjustLayout() 207 | { 208 | if (GetSafeHwnd() == nullptr) 209 | { 210 | return; 211 | } 212 | 213 | CRect rectClient; 214 | GetClientRect(rectClient); 215 | 216 | int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy; 217 | 218 | m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER); 219 | m_wndClassView.SetWindowPos(nullptr, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER); 220 | } 221 | 222 | BOOL CClassView::PreTranslateMessage(MSG* pMsg) 223 | { 224 | return CDockablePane::PreTranslateMessage(pMsg); 225 | } 226 | 227 | void CClassView::OnSort(UINT id) 228 | { 229 | if (m_nCurrSort == id) 230 | { 231 | return; 232 | } 233 | 234 | m_nCurrSort = id; 235 | 236 | CClassViewMenuButton* pButton = DYNAMIC_DOWNCAST(CClassViewMenuButton, m_wndToolBar.GetButton(0)); 237 | 238 | if (pButton != nullptr) 239 | { 240 | pButton->SetImage(GetCmdMgr()->GetCmdImage(id)); 241 | m_wndToolBar.Invalidate(); 242 | m_wndToolBar.UpdateWindow(); 243 | } 244 | } 245 | 246 | void CClassView::OnUpdateSort(CCmdUI* pCmdUI) 247 | { 248 | pCmdUI->SetCheck(pCmdUI->m_nID == m_nCurrSort); 249 | } 250 | 251 | void CClassView::OnClassAddMemberFunction() 252 | { 253 | AfxMessageBox(_T("添加成员函数...")); 254 | } 255 | 256 | void CClassView::OnClassAddMemberVariable() 257 | { 258 | // TODO: 在此处添加命令处理程序代码 259 | } 260 | 261 | void CClassView::OnClassDefinition() 262 | { 263 | // TODO: 在此处添加命令处理程序代码 264 | } 265 | 266 | void CClassView::OnClassProperties() 267 | { 268 | // TODO: 在此处添加命令处理程序代码 269 | } 270 | 271 | void CClassView::OnNewFolder() 272 | { 273 | AfxMessageBox(_T("新建文件夹...")); 274 | } 275 | 276 | void CClassView::OnPaint() 277 | { 278 | CPaintDC dc(this); // 用于绘制的设备上下文 279 | 280 | CRect rectTree; 281 | m_wndClassView.GetWindowRect(rectTree); 282 | ScreenToClient(rectTree); 283 | 284 | rectTree.InflateRect(1, 1); 285 | dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW)); 286 | } 287 | 288 | void CClassView::OnSetFocus(CWnd* pOldWnd) 289 | { 290 | CDockablePane::OnSetFocus(pOldWnd); 291 | 292 | m_wndClassView.SetFocus(); 293 | } 294 | 295 | void CClassView::OnChangeVisualStyle() 296 | { 297 | m_ClassViewImages.DeleteImageList(); 298 | 299 | UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_CLASS_VIEW_24 : IDB_CLASS_VIEW; 300 | 301 | CBitmap bmp; 302 | if (!bmp.LoadBitmap(uiBmpId)) 303 | { 304 | TRACE(_T("无法加载位图: %x\n"), uiBmpId); 305 | ASSERT(FALSE); 306 | return; 307 | } 308 | 309 | BITMAP bmpObj; 310 | bmp.GetBitmap(&bmpObj); 311 | 312 | UINT nFlags = ILC_MASK; 313 | 314 | nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4; 315 | 316 | m_ClassViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0); 317 | m_ClassViewImages.Add(&bmp, RGB(255, 0, 0)); 318 | 319 | m_wndClassView.SetImageList(&m_ClassViewImages, TVSIL_NORMAL); 320 | 321 | m_wndToolBar.CleanUpLockedImages(); 322 | m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_SORT_24 : IDR_SORT, 0, 0, TRUE /* 锁定*/); 323 | } 324 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ClassView.h: -------------------------------------------------------------------------------- 1 |  2 | #pragma once 3 | 4 | #include "ViewTree.h" 5 | 6 | class CClassToolBar : public CMFCToolBar 7 | { 8 | virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler) 9 | { 10 | CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler); 11 | } 12 | 13 | virtual BOOL AllowShowOnList() const { return FALSE; } 14 | }; 15 | 16 | class CClassView : public CDockablePane 17 | { 18 | public: 19 | CClassView() noexcept; 20 | virtual ~CClassView(); 21 | 22 | void AdjustLayout(); 23 | void OnChangeVisualStyle(); 24 | 25 | protected: 26 | CClassToolBar m_wndToolBar; 27 | CViewTree m_wndClassView; 28 | CImageList m_ClassViewImages; 29 | UINT m_nCurrSort; 30 | 31 | void FillClassView(); 32 | 33 | // 重写 34 | public: 35 | virtual BOOL PreTranslateMessage(MSG* pMsg); 36 | 37 | protected: 38 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 39 | afx_msg void OnSize(UINT nType, int cx, int cy); 40 | afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 41 | afx_msg void OnClassAddMemberFunction(); 42 | afx_msg void OnClassAddMemberVariable(); 43 | afx_msg void OnClassDefinition(); 44 | afx_msg void OnClassProperties(); 45 | afx_msg void OnNewFolder(); 46 | afx_msg void OnPaint(); 47 | afx_msg void OnSetFocus(CWnd* pOldWnd); 48 | afx_msg LRESULT OnChangeActiveTab(WPARAM, LPARAM); 49 | afx_msg void OnSort(UINT id); 50 | afx_msg void OnUpdateSort(CCmdUI* pCmdUI); 51 | 52 | DECLARE_MESSAGE_MAP() 53 | }; 54 | 55 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.aps -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.cpp: -------------------------------------------------------------------------------- 1 |  2 | // ComputerGraphicDDA.cpp: 定义应用程序的类行为。 3 | // 4 | 5 | #include "pch.h" 6 | #include "framework.h" 7 | #include "afxwinappex.h" 8 | #include "afxdialogex.h" 9 | #include "ComputerGraphicDDA.h" 10 | #include "MainFrm.h" 11 | 12 | #include "ComputerGraphicDDADoc.h" 13 | #include "ComputerGraphicDDAView.h" 14 | 15 | #ifdef _DEBUG 16 | #define new DEBUG_NEW 17 | #endif 18 | 19 | 20 | // CComputerGraphicDDAApp 21 | 22 | BEGIN_MESSAGE_MAP(CComputerGraphicDDAApp, CWinAppEx) 23 | ON_COMMAND(ID_APP_ABOUT, &CComputerGraphicDDAApp::OnAppAbout) 24 | // 基于文件的标准文档命令 25 | ON_COMMAND(ID_FILE_NEW, &CWinAppEx::OnFileNew) 26 | ON_COMMAND(ID_FILE_OPEN, &CWinAppEx::OnFileOpen) 27 | // 标准打印设置命令 28 | ON_COMMAND(ID_FILE_PRINT_SETUP, &CWinAppEx::OnFilePrintSetup) 29 | END_MESSAGE_MAP() 30 | 31 | 32 | // CComputerGraphicDDAApp 构造 33 | 34 | CComputerGraphicDDAApp::CComputerGraphicDDAApp() noexcept 35 | { 36 | m_bHiColorIcons = TRUE; 37 | 38 | 39 | m_nAppLook = 0; 40 | // 支持重新启动管理器 41 | m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS; 42 | #ifdef _MANAGED 43 | // 如果应用程序是利用公共语言运行时支持(/clr)构建的,则: 44 | // 1) 必须有此附加设置,“重新启动管理器”支持才能正常工作。 45 | // 2) 在您的项目中,您必须按照生成顺序向 System.Windows.Forms 添加引用。 46 | System::Windows::Forms::Application::SetUnhandledExceptionMode(System::Windows::Forms::UnhandledExceptionMode::ThrowException); 47 | #endif 48 | 49 | // TODO: 将以下应用程序 ID 字符串替换为唯一的 ID 字符串;建议的字符串格式 50 | //为 CompanyName.ProductName.SubProduct.VersionInformation 51 | SetAppID(_T("ComputerGraphicDDA.AppID.NoVersion")); 52 | 53 | // TODO: 在此处添加构造代码, 54 | // 将所有重要的初始化放置在 InitInstance 中 55 | } 56 | 57 | // 唯一的 CComputerGraphicDDAApp 对象 58 | 59 | CComputerGraphicDDAApp theApp; 60 | 61 | 62 | // CComputerGraphicDDAApp 初始化 63 | 64 | BOOL CComputerGraphicDDAApp::InitInstance() 65 | { 66 | // 如果一个运行在 Windows XP 上的应用程序清单指定要 67 | // 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式, 68 | //则需要 InitCommonControlsEx()。 否则,将无法创建窗口。 69 | INITCOMMONCONTROLSEX InitCtrls; 70 | InitCtrls.dwSize = sizeof(InitCtrls); 71 | // 将它设置为包括所有要在应用程序中使用的 72 | // 公共控件类。 73 | InitCtrls.dwICC = ICC_WIN95_CLASSES; 74 | InitCommonControlsEx(&InitCtrls); 75 | 76 | CWinAppEx::InitInstance(); 77 | 78 | 79 | // 初始化 OLE 库 80 | if (!AfxOleInit()) 81 | { 82 | AfxMessageBox(IDP_OLE_INIT_FAILED); 83 | return FALSE; 84 | } 85 | 86 | AfxEnableControlContainer(); 87 | 88 | EnableTaskbarInteraction(FALSE); 89 | 90 | // 使用 RichEdit 控件需要 AfxInitRichEdit2() 91 | // AfxInitRichEdit2(); 92 | 93 | // 标准初始化 94 | // 如果未使用这些功能并希望减小 95 | // 最终可执行文件的大小,则应移除下列 96 | // 不需要的特定初始化例程 97 | // 更改用于存储设置的注册表项 98 | // TODO: 应适当修改该字符串, 99 | // 例如修改为公司或组织名 100 | SetRegistryKey(_T("应用程序向导生成的本地应用程序")); 101 | LoadStdProfileSettings(4); // 加载标准 INI 文件选项(包括 MRU) 102 | 103 | 104 | InitContextMenuManager(); 105 | 106 | InitKeyboardManager(); 107 | 108 | InitTooltipManager(); 109 | CMFCToolTipInfo ttParams; 110 | ttParams.m_bVislManagerTheme = TRUE; 111 | theApp.GetTooltipManager()->SetTooltipParams(AFX_TOOLTIP_TYPE_ALL, 112 | RUNTIME_CLASS(CMFCToolTipCtrl), &ttParams); 113 | 114 | // 注册应用程序的文档模板。 文档模板 115 | // 将用作文档、框架窗口和视图之间的连接 116 | CSingleDocTemplate* pDocTemplate; 117 | pDocTemplate = new CSingleDocTemplate( 118 | IDR_MAINFRAME, 119 | RUNTIME_CLASS(CComputerGraphicDDADoc), 120 | RUNTIME_CLASS(CMainFrame), // 主 SDI 框架窗口 121 | RUNTIME_CLASS(CComputerGraphicDDAView)); 122 | if (!pDocTemplate) 123 | return FALSE; 124 | AddDocTemplate(pDocTemplate); 125 | 126 | 127 | // 分析标准 shell 命令、DDE、打开文件操作的命令行 128 | CCommandLineInfo cmdInfo; 129 | ParseCommandLine(cmdInfo); 130 | 131 | 132 | 133 | // 调度在命令行中指定的命令。 如果 134 | // 用 /RegServer、/Register、/Unregserver 或 /Unregister 启动应用程序,则返回 FALSE。 135 | if (!ProcessShellCommand(cmdInfo)) 136 | return FALSE; 137 | 138 | // 唯一的一个窗口已初始化,因此显示它并对其进行更新 139 | m_pMainWnd->ShowWindow(SW_SHOW); 140 | m_pMainWnd->UpdateWindow(); 141 | return TRUE; 142 | } 143 | 144 | int CComputerGraphicDDAApp::ExitInstance() 145 | { 146 | //TODO: 处理可能已添加的附加资源 147 | AfxOleTerm(FALSE); 148 | 149 | return CWinAppEx::ExitInstance(); 150 | } 151 | 152 | // CComputerGraphicDDAApp 消息处理程序 153 | 154 | 155 | // 用于应用程序“关于”菜单项的 CAboutDlg 对话框 156 | 157 | class CAboutDlg : public CDialogEx 158 | { 159 | public: 160 | CAboutDlg() noexcept; 161 | private: 162 | CBitmap m_Senpai; 163 | 164 | // 对话框数据 165 | #ifdef AFX_DESIGN_TIME 166 | enum { IDD = IDD_ABOUTBOX }; 167 | #endif 168 | 169 | protected: 170 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 171 | 172 | // 实现 173 | protected: 174 | DECLARE_MESSAGE_MAP() 175 | public: 176 | afx_msg void OnCurveBezier(); 177 | }; 178 | 179 | CAboutDlg::CAboutDlg() noexcept : CDialogEx(IDD_ABOUTBOX) 180 | { 181 | } 182 | 183 | void CAboutDlg::DoDataExchange(CDataExchange* pDX) 184 | { 185 | CDialogEx::DoDataExchange(pDX); 186 | } 187 | 188 | BEGIN_MESSAGE_MAP(CAboutDlg, CDialogEx) 189 | ON_COMMAND(ID_CURVE_BEZIER, &CAboutDlg::OnCurveBezier) 190 | END_MESSAGE_MAP() 191 | 192 | // 用于运行对话框的应用程序命令 193 | void CComputerGraphicDDAApp::OnAppAbout() 194 | { 195 | CAboutDlg aboutDlg; 196 | aboutDlg.DoModal(); 197 | } 198 | 199 | // CComputerGraphicDDAApp 自定义加载/保存方法 200 | 201 | void CComputerGraphicDDAApp::PreLoadState() 202 | { 203 | BOOL bNameValid; 204 | CString strName; 205 | bNameValid = strName.LoadString(IDS_EDIT_MENU); 206 | ASSERT(bNameValid); 207 | GetContextMenuManager()->AddMenu(strName, IDR_POPUP_EDIT); 208 | bNameValid = strName.LoadString(IDS_EXPLORER); 209 | ASSERT(bNameValid); 210 | GetContextMenuManager()->AddMenu(strName, IDR_POPUP_EXPLORER); 211 | } 212 | 213 | void CComputerGraphicDDAApp::LoadCustomState() 214 | { 215 | } 216 | 217 | void CComputerGraphicDDAApp::SaveCustomState() 218 | { 219 | } 220 | 221 | // CComputerGraphicDDAApp 消息处理程序 222 | 223 | 224 | 225 | 226 | 227 | void CAboutDlg::OnCurveBezier() 228 | { 229 | // TODO: 在此添加命令处理程序代码 230 | 231 | } 232 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.h: -------------------------------------------------------------------------------- 1 | 2 | // ComputerGraphicDDA.h: ComputerGraphicDDA 应用程序的主头文件 3 | // 4 | #pragma once 5 | 6 | #ifndef __AFXWIN_H__ 7 | #error "在包含此文件之前包含 'pch.h' 以生成 PCH" 8 | #endif 9 | 10 | #include "resource.h" // 主符号 11 | #include "math.h" 12 | 13 | // CComputerGraphicDDAApp: 14 | // 有关此类的实现,请参阅 ComputerGraphicDDA.cpp 15 | // 16 | 17 | class CComputerGraphicDDAApp : public CWinAppEx 18 | { 19 | public: 20 | CComputerGraphicDDAApp() noexcept; 21 | 22 | 23 | // 重写 24 | public: 25 | virtual BOOL InitInstance(); 26 | virtual int ExitInstance(); 27 | 28 | // 实现 29 | UINT m_nAppLook; 30 | BOOL m_bHiColorIcons; 31 | 32 | virtual void PreLoadState(); 33 | virtual void LoadCustomState(); 34 | virtual void SaveCustomState(); 35 | 36 | afx_msg void OnAppAbout(); 37 | DECLARE_MESSAGE_MAP() 38 | }; 39 | 40 | extern CComputerGraphicDDAApp theApp; 41 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.rc -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 头文件 20 | 21 | 22 | 头文件 23 | 24 | 25 | 头文件 26 | 27 | 28 | 头文件 29 | 30 | 31 | 头文件 32 | 33 | 34 | 头文件 35 | 36 | 37 | 头文件 38 | 39 | 40 | 头文件 41 | 42 | 43 | 头文件 44 | 45 | 46 | 头文件 47 | 48 | 49 | 头文件 50 | 51 | 52 | 头文件 53 | 54 | 55 | 头文件 56 | 57 | 58 | 头文件 59 | 60 | 61 | 头文件 62 | 63 | 64 | 头文件 65 | 66 | 67 | 68 | 69 | 源文件 70 | 71 | 72 | 源文件 73 | 74 | 75 | 源文件 76 | 77 | 78 | 源文件 79 | 80 | 81 | 源文件 82 | 83 | 84 | 源文件 85 | 86 | 87 | 源文件 88 | 89 | 90 | 源文件 91 | 92 | 93 | 源文件 94 | 95 | 96 | 源文件 97 | 98 | 99 | 源文件 100 | 101 | 102 | 源文件 103 | 104 | 105 | 源文件 106 | 107 | 108 | 109 | 110 | 资源文件 111 | 112 | 113 | 114 | 115 | 资源文件 116 | 117 | 118 | 资源文件 119 | 120 | 121 | 资源文件 122 | 123 | 124 | 资源文件 125 | 126 | 127 | 资源文件 128 | 129 | 130 | 资源文件 131 | 132 | 133 | 资源文件 134 | 135 | 136 | 资源文件 137 | 138 | 139 | 资源文件 140 | 141 | 142 | 资源文件 143 | 144 | 145 | 资源文件 146 | 147 | 148 | 资源文件 149 | 150 | 151 | 资源文件 152 | 153 | 154 | 资源文件 155 | 156 | 157 | 资源文件 158 | 159 | 160 | 资源文件 161 | 162 | 163 | 资源文件 164 | 165 | 166 | 资源文件 167 | 168 | 169 | 资源文件 170 | 171 | 172 | 资源文件 173 | 174 | 175 | 资源文件 176 | 177 | 178 | 资源文件 179 | 180 | 181 | 资源文件 182 | 183 | 184 | 资源文件 185 | 186 | 187 | 资源文件 188 | 189 | 190 | 资源文件 191 | 192 | 193 | 资源文件 194 | 195 | 196 | 资源文件 197 | 198 | 199 | 200 | 201 | 资源文件 202 | 203 | 204 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDA.vcxproj.user: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | ComputerGraphicDDA.rc 5 | 6 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDADoc.h: -------------------------------------------------------------------------------- 1 |  2 | // ComputerGraphicDDADoc.h: CComputerGraphicDDADoc 类的接口 3 | // 4 | 5 | 6 | #pragma once 7 | #include "CReality.h" 8 | 9 | class CComputerGraphicDDADoc : public CDocument 10 | { 11 | protected: // 仅从序列化创建 12 | CComputerGraphicDDADoc() noexcept; 13 | DECLARE_DYNCREATE(CComputerGraphicDDADoc) 14 | 15 | // 特性 16 | public: 17 | CPoint group[100];//定义数组, 18 | int PointNum; 19 | COLORREF m_crColor;//保存图形颜色 20 | 21 | // 操作 22 | public: 23 | void DDALine(CClientDC* DCPoint);//定义函数 24 | void MIDLine(CClientDC* DCPoint);//定义中点直线函数 25 | void BCircle(CClientDC* DCPoint, CPoint p1, CPoint p2); 26 | void PNCircle(CClientDC* DCPoint, CPoint p1, CPoint p2); 27 | void Bezier(CClientDC* DCPoint, int mode); 28 | void Bezier_4(CClientDC* DCPoint, int mode, CPoint p1, CPoint p2, CPoint p3, CPoint p4); 29 | void GenerateGraph(CClientDC* DCPoint); 30 | void DrawGraph(CClientDC* DCPoint); 31 | void Symmetry(CPoint p1, CPoint p2); 32 | void SeedFill(CClientDC* DCPoint, CPoint p); 33 | void EdgeFill(CClientDC* DCPoint); 34 | void DrawWindow(CClientDC* DCPoint); 35 | void CohenSutherland(CClientDC* DCPoint, CPoint p1, CPoint p2); 36 | int encode(int x, int y); 37 | void PolygonCut(CClientDC* DCPoint); 38 | void EdgeClipping(int linecode); 39 | void BCircle(CClientDC* DCPoint, CRect* rc, CPoint p1, CPoint p2); 40 | void CircleCut(CClientDC* DCPoint, CPoint p1, CPoint p2); 41 | void GenerateGraph2(CClientDC* DCPoint); 42 | void Bsampl(CClientDC* DCPoint, int mode); 43 | void Hermite(CClientDC* DCPoint, int mode); 44 | void cutmiddle(CClientDC* DCPoint, CPoint p1, CPoint p2); 45 | bool ClipT(float p, float q, float* u1, float* u2); 46 | void LB_lineClip(CClientDC* DCPoint, CPoint p1, CPoint p2); 47 | void drawPhong(double x, double y, CClientDC* DCPoint); 48 | void drawLambert(double x, double y, CClientDC* DCPoint); 49 | 50 | // 重写 51 | public: 52 | virtual BOOL OnNewDocument(); 53 | virtual void Serialize(CArchive& ar); 54 | #ifdef SHARED_HANDLERS 55 | virtual void InitializeSearchContent(); 56 | virtual void OnDrawThumbnail(CDC& dc, LPRECT lprcBounds); 57 | #endif // SHARED_HANDLERS 58 | 59 | // 实现 60 | public: 61 | virtual ~CComputerGraphicDDADoc(); 62 | #ifdef _DEBUG 63 | virtual void AssertValid() const; 64 | virtual void Dump(CDumpContext& dc) const; 65 | #endif 66 | 67 | protected: 68 | 69 | // 生成的消息映射函数 70 | protected: 71 | DECLARE_MESSAGE_MAP() 72 | 73 | #ifdef SHARED_HANDLERS 74 | // 用于为搜索处理程序设置搜索内容的 Helper 函数 75 | void SetSearchContent(const CString& value); 76 | #endif // SHARED_HANDLERS 77 | public: 78 | afx_msg void OnSetColor(); 79 | }; 80 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ComputerGraphicDDAView.h: -------------------------------------------------------------------------------- 1 |  2 | // ComputerGraphicDDAView.h: CComputerGraphicDDAView 类的接口 3 | // 4 | 5 | #pragma once 6 | 7 | 8 | class CComputerGraphicDDAView : public CView 9 | { 10 | protected: // 仅从序列化创建 11 | int MenuID, PressNum, SaveNumber; 12 | CPoint mPointOrign, mPointOld, mPointOld1; 13 | CComputerGraphicDDAView() noexcept; 14 | DECLARE_DYNCREATE(CComputerGraphicDDAView) 15 | 16 | // 特性 17 | public: 18 | CComputerGraphicDDADoc* GetDocument() const; 19 | 20 | // 操作 21 | public: 22 | 23 | // 重写 24 | public: 25 | virtual void OnDraw(CDC* pDC); // 重写以绘制该视图 26 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 27 | protected: 28 | virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); 29 | virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); 30 | virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); 31 | 32 | // 实现 33 | public: 34 | virtual ~CComputerGraphicDDAView(); 35 | #ifdef _DEBUG 36 | virtual void AssertValid() const; 37 | virtual void Dump(CDumpContext& dc) const; 38 | #endif 39 | 40 | protected: 41 | 42 | // 生成的消息映射函数 43 | protected: 44 | afx_msg void OnFilePrintPreview(); 45 | afx_msg void OnRButtonUp(UINT nFlags, CPoint point); 46 | afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 47 | DECLARE_MESSAGE_MAP() 48 | public: 49 | afx_msg void OnLButtonDown(UINT nFlags, CPoint point); 50 | afx_msg void OnRButtonDown(UINT nFlags, CPoint point); 51 | afx_msg void OnMouseMove(UINT nFlags, CPoint point); 52 | afx_msg void OnDrawDdaline(); 53 | afx_msg void OnDrawBcircle(); 54 | afx_msg void OnDrawPncircle(); 55 | afx_msg void OnCurveBezier(); 56 | afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); 57 | afx_msg void OnDrawMidline(); 58 | afx_msg void OnSetChar(); 59 | afx_msg void OnTransMove(); 60 | afx_msg void OnTransSymmetry(); 61 | afx_msg void OnFillSeed(); 62 | afx_msg void OnFillEdge(); 63 | afx_msg void OnFillScanline(); 64 | afx_msg void OnCutCs(); 65 | afx_msg void OnCutPolygon(); 66 | afx_msg void OnCutCircle(); 67 | afx_msg void OnTransRotate(); 68 | afx_msg void OnTransZoom(); 69 | afx_msg void OnCurveBsample(); 70 | afx_msg void OnCurveHermite(); 71 | afx_msg void OnCutLiang(); 72 | afx_msg void OnCutMiddle(); 73 | afx_msg void OnBlanking(); 74 | afx_msg void OnLambert(); 75 | afx_msg void OnPhong(); 76 | }; 77 | 78 | #ifndef _DEBUG // ComputerGraphicDDAView.cpp 中的调试版本 79 | inline CComputerGraphicDDADoc* CComputerGraphicDDAView::GetDocument() const 80 | { return reinterpret_cast(m_pDocument); } 81 | #endif 82 | 83 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/FileView.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "pch.h" 3 | #include "framework.h" 4 | #include "mainfrm.h" 5 | #include "FileView.h" 6 | #include "Resource.h" 7 | #include "ComputerGraphicDDA.h" 8 | 9 | #ifdef _DEBUG 10 | #undef THIS_FILE 11 | static char THIS_FILE[]=__FILE__; 12 | #define new DEBUG_NEW 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // CFileView 17 | 18 | CFileView::CFileView() noexcept 19 | { 20 | } 21 | 22 | CFileView::~CFileView() 23 | { 24 | } 25 | 26 | BEGIN_MESSAGE_MAP(CFileView, CDockablePane) 27 | ON_WM_CREATE() 28 | ON_WM_SIZE() 29 | ON_WM_CONTEXTMENU() 30 | ON_COMMAND(ID_PROPERTIES, OnProperties) 31 | ON_COMMAND(ID_OPEN, OnFileOpen) 32 | ON_COMMAND(ID_OPEN_WITH, OnFileOpenWith) 33 | ON_COMMAND(ID_DUMMY_COMPILE, OnDummyCompile) 34 | ON_COMMAND(ID_EDIT_CUT, OnEditCut) 35 | ON_COMMAND(ID_EDIT_COPY, OnEditCopy) 36 | ON_COMMAND(ID_EDIT_CLEAR, OnEditClear) 37 | ON_WM_PAINT() 38 | ON_WM_SETFOCUS() 39 | END_MESSAGE_MAP() 40 | 41 | ///////////////////////////////////////////////////////////////////////////// 42 | // CWorkspaceBar 消息处理程序 43 | 44 | int CFileView::OnCreate(LPCREATESTRUCT lpCreateStruct) 45 | { 46 | if (CDockablePane::OnCreate(lpCreateStruct) == -1) 47 | return -1; 48 | 49 | CRect rectDummy; 50 | rectDummy.SetRectEmpty(); 51 | 52 | // 创建视图: 53 | const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | TVS_HASLINES | TVS_LINESATROOT | TVS_HASBUTTONS; 54 | 55 | if (!m_wndFileView.Create(dwViewStyle, rectDummy, this, 4)) 56 | { 57 | TRACE0("未能创建文件视图\n"); 58 | return -1; // 未能创建 59 | } 60 | 61 | // 加载视图图像: 62 | m_FileViewImages.Create(IDB_FILE_VIEW, 16, 0, RGB(255, 0, 255)); 63 | m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL); 64 | 65 | m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_EXPLORER); 66 | m_wndToolBar.LoadToolBar(IDR_EXPLORER, 0, 0, TRUE /* 已锁定*/); 67 | 68 | OnChangeVisualStyle(); 69 | 70 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); 71 | 72 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); 73 | 74 | m_wndToolBar.SetOwner(this); 75 | 76 | // 所有命令将通过此控件路由,而不是通过主框架路由: 77 | m_wndToolBar.SetRouteCommandsViaFrame(FALSE); 78 | 79 | // 填入一些静态树视图数据(此处只需填入虚拟代码,而不是复杂的数据) 80 | FillFileView(); 81 | AdjustLayout(); 82 | 83 | return 0; 84 | } 85 | 86 | void CFileView::OnSize(UINT nType, int cx, int cy) 87 | { 88 | CDockablePane::OnSize(nType, cx, cy); 89 | AdjustLayout(); 90 | } 91 | 92 | void CFileView::FillFileView() 93 | { 94 | HTREEITEM hRoot = m_wndFileView.InsertItem(_T("FakeApp 文件"), 0, 0); 95 | m_wndFileView.SetItemState(hRoot, TVIS_BOLD, TVIS_BOLD); 96 | 97 | HTREEITEM hSrc = m_wndFileView.InsertItem(_T("FakeApp 源文件"), 0, 0, hRoot); 98 | 99 | m_wndFileView.InsertItem(_T("FakeApp.cpp"), 1, 1, hSrc); 100 | m_wndFileView.InsertItem(_T("FakeApp.rc"), 1, 1, hSrc); 101 | m_wndFileView.InsertItem(_T("FakeAppDoc.cpp"), 1, 1, hSrc); 102 | m_wndFileView.InsertItem(_T("FakeAppView.cpp"), 1, 1, hSrc); 103 | m_wndFileView.InsertItem(_T("MainFrm.cpp"), 1, 1, hSrc); 104 | m_wndFileView.InsertItem(_T("pch.cpp"), 1, 1, hSrc); 105 | 106 | HTREEITEM hInc = m_wndFileView.InsertItem(_T("FakeApp 头文件"), 0, 0, hRoot); 107 | 108 | m_wndFileView.InsertItem(_T("FakeApp.h"), 2, 2, hInc); 109 | m_wndFileView.InsertItem(_T("FakeAppDoc.h"), 2, 2, hInc); 110 | m_wndFileView.InsertItem(_T("FakeAppView.h"), 2, 2, hInc); 111 | m_wndFileView.InsertItem(_T("Resource.h"), 2, 2, hInc); 112 | m_wndFileView.InsertItem(_T("MainFrm.h"), 2, 2, hInc); 113 | m_wndFileView.InsertItem(_T("pch.h"), 2, 2, hInc); 114 | 115 | HTREEITEM hRes = m_wndFileView.InsertItem(_T("FakeApp 资源文件"), 0, 0, hRoot); 116 | 117 | m_wndFileView.InsertItem(_T("FakeApp.ico"), 2, 2, hRes); 118 | m_wndFileView.InsertItem(_T("FakeApp.rc2"), 2, 2, hRes); 119 | m_wndFileView.InsertItem(_T("FakeAppDoc.ico"), 2, 2, hRes); 120 | m_wndFileView.InsertItem(_T("FakeToolbar.bmp"), 2, 2, hRes); 121 | 122 | m_wndFileView.Expand(hRoot, TVE_EXPAND); 123 | m_wndFileView.Expand(hSrc, TVE_EXPAND); 124 | m_wndFileView.Expand(hInc, TVE_EXPAND); 125 | } 126 | 127 | void CFileView::OnContextMenu(CWnd* pWnd, CPoint point) 128 | { 129 | CTreeCtrl* pWndTree = (CTreeCtrl*) &m_wndFileView; 130 | ASSERT_VALID(pWndTree); 131 | 132 | if (pWnd != pWndTree) 133 | { 134 | CDockablePane::OnContextMenu(pWnd, point); 135 | return; 136 | } 137 | 138 | if (point != CPoint(-1, -1)) 139 | { 140 | // 选择已单击的项: 141 | CPoint ptTree = point; 142 | pWndTree->ScreenToClient(&ptTree); 143 | 144 | UINT flags = 0; 145 | HTREEITEM hTreeItem = pWndTree->HitTest(ptTree, &flags); 146 | if (hTreeItem != nullptr) 147 | { 148 | pWndTree->SelectItem(hTreeItem); 149 | } 150 | } 151 | 152 | pWndTree->SetFocus(); 153 | theApp.GetContextMenuManager()->ShowPopupMenu(IDR_POPUP_EXPLORER, point.x, point.y, this, TRUE); 154 | } 155 | 156 | void CFileView::AdjustLayout() 157 | { 158 | if (GetSafeHwnd() == nullptr) 159 | { 160 | return; 161 | } 162 | 163 | CRect rectClient; 164 | GetClientRect(rectClient); 165 | 166 | int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy; 167 | 168 | m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER); 169 | m_wndFileView.SetWindowPos(nullptr, rectClient.left + 1, rectClient.top + cyTlb + 1, rectClient.Width() - 2, rectClient.Height() - cyTlb - 2, SWP_NOACTIVATE | SWP_NOZORDER); 170 | } 171 | 172 | void CFileView::OnProperties() 173 | { 174 | AfxMessageBox(_T("属性....")); 175 | 176 | } 177 | 178 | void CFileView::OnFileOpen() 179 | { 180 | // TODO: 在此处添加命令处理程序代码 181 | } 182 | 183 | void CFileView::OnFileOpenWith() 184 | { 185 | // TODO: 在此处添加命令处理程序代码 186 | } 187 | 188 | void CFileView::OnDummyCompile() 189 | { 190 | // TODO: 在此处添加命令处理程序代码 191 | } 192 | 193 | void CFileView::OnEditCut() 194 | { 195 | // TODO: 在此处添加命令处理程序代码 196 | } 197 | 198 | void CFileView::OnEditCopy() 199 | { 200 | // TODO: 在此处添加命令处理程序代码 201 | } 202 | 203 | void CFileView::OnEditClear() 204 | { 205 | // TODO: 在此处添加命令处理程序代码 206 | } 207 | 208 | void CFileView::OnPaint() 209 | { 210 | CPaintDC dc(this); // 用于绘制的设备上下文 211 | 212 | CRect rectTree; 213 | m_wndFileView.GetWindowRect(rectTree); 214 | ScreenToClient(rectTree); 215 | 216 | rectTree.InflateRect(1, 1); 217 | dc.Draw3dRect(rectTree, ::GetSysColor(COLOR_3DSHADOW), ::GetSysColor(COLOR_3DSHADOW)); 218 | } 219 | 220 | void CFileView::OnSetFocus(CWnd* pOldWnd) 221 | { 222 | CDockablePane::OnSetFocus(pOldWnd); 223 | 224 | m_wndFileView.SetFocus(); 225 | } 226 | 227 | void CFileView::OnChangeVisualStyle() 228 | { 229 | m_wndToolBar.CleanUpLockedImages(); 230 | m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_EXPLORER_24 : IDR_EXPLORER, 0, 0, TRUE /* 锁定*/); 231 | 232 | m_FileViewImages.DeleteImageList(); 233 | 234 | UINT uiBmpId = theApp.m_bHiColorIcons ? IDB_FILE_VIEW_24 : IDB_FILE_VIEW; 235 | 236 | CBitmap bmp; 237 | if (!bmp.LoadBitmap(uiBmpId)) 238 | { 239 | TRACE(_T("无法加载位图: %x\n"), uiBmpId); 240 | ASSERT(FALSE); 241 | return; 242 | } 243 | 244 | BITMAP bmpObj; 245 | bmp.GetBitmap(&bmpObj); 246 | 247 | UINT nFlags = ILC_MASK; 248 | 249 | nFlags |= (theApp.m_bHiColorIcons) ? ILC_COLOR24 : ILC_COLOR4; 250 | 251 | m_FileViewImages.Create(16, bmpObj.bmHeight, nFlags, 0, 0); 252 | m_FileViewImages.Add(&bmp, RGB(255, 0, 255)); 253 | 254 | m_wndFileView.SetImageList(&m_FileViewImages, TVSIL_NORMAL); 255 | } 256 | 257 | 258 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/FileView.h: -------------------------------------------------------------------------------- 1 |  2 | #pragma once 3 | 4 | #include "ViewTree.h" 5 | 6 | class CFileViewToolBar : public CMFCToolBar 7 | { 8 | virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler) 9 | { 10 | CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler); 11 | } 12 | 13 | virtual BOOL AllowShowOnList() const { return FALSE; } 14 | }; 15 | 16 | class CFileView : public CDockablePane 17 | { 18 | // 构造 19 | public: 20 | CFileView() noexcept; 21 | 22 | void AdjustLayout(); 23 | void OnChangeVisualStyle(); 24 | 25 | // 特性 26 | protected: 27 | 28 | CViewTree m_wndFileView; 29 | CImageList m_FileViewImages; 30 | CFileViewToolBar m_wndToolBar; 31 | 32 | protected: 33 | void FillFileView(); 34 | 35 | // 实现 36 | public: 37 | virtual ~CFileView(); 38 | 39 | protected: 40 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 41 | afx_msg void OnSize(UINT nType, int cx, int cy); 42 | afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 43 | afx_msg void OnProperties(); 44 | afx_msg void OnFileOpen(); 45 | afx_msg void OnFileOpenWith(); 46 | afx_msg void OnDummyCompile(); 47 | afx_msg void OnEditCut(); 48 | afx_msg void OnEditCopy(); 49 | afx_msg void OnEditClear(); 50 | afx_msg void OnPaint(); 51 | afx_msg void OnSetFocus(CWnd* pOldWnd); 52 | 53 | DECLARE_MESSAGE_MAP() 54 | }; 55 | 56 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/MainFrm.h: -------------------------------------------------------------------------------- 1 |  2 | // MainFrm.h: CMainFrame 类的接口 3 | // 4 | 5 | #pragma once 6 | #include "FileView.h" 7 | #include "ClassView.h" 8 | #include "OutputWnd.h" 9 | #include "PropertiesWnd.h" 10 | 11 | class CMainFrame : public CFrameWndEx 12 | { 13 | 14 | protected: // 仅从序列化创建 15 | CMainFrame() noexcept; 16 | DECLARE_DYNCREATE(CMainFrame) 17 | 18 | // 特性 19 | public: 20 | 21 | // 操作 22 | public: 23 | 24 | // 重写 25 | public: 26 | virtual BOOL PreCreateWindow(CREATESTRUCT& cs); 27 | virtual BOOL LoadFrame(UINT nIDResource, DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, CWnd* pParentWnd = nullptr, CCreateContext* pContext = nullptr); 28 | 29 | // 实现 30 | public: 31 | virtual ~CMainFrame(); 32 | #ifdef _DEBUG 33 | virtual void AssertValid() const; 34 | virtual void Dump(CDumpContext& dc) const; 35 | #endif 36 | 37 | protected: // 控件条嵌入成员 38 | CMFCMenuBar m_wndMenuBar; 39 | CMFCToolBar m_wndToolBar; 40 | //CMFCStatusBar m_wndStatusBar; 41 | CMFCToolBarImages m_UserImages; 42 | CFileView m_wndFileView; 43 | CClassView m_wndClassView; 44 | COutputWnd m_wndOutput; 45 | CPropertiesWnd m_wndProperties; 46 | 47 | // 生成的消息映射函数 48 | protected: 49 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 50 | afx_msg void OnViewCustomize(); 51 | afx_msg LRESULT OnToolbarCreateNew(WPARAM wp, LPARAM lp); 52 | afx_msg void OnApplicationLook(UINT id); 53 | afx_msg void OnUpdateApplicationLook(CCmdUI* pCmdUI); 54 | afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection); 55 | DECLARE_MESSAGE_MAP() 56 | 57 | BOOL CreateDockingWindows(); 58 | void SetDockingWindowIcons(BOOL bHiColorIcons); 59 | }; 60 | 61 | 62 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/OutputWnd.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "pch.h" 3 | #include "framework.h" 4 | 5 | #include "OutputWnd.h" 6 | #include "Resource.h" 7 | #include "MainFrm.h" 8 | 9 | #ifdef _DEBUG 10 | #define new DEBUG_NEW 11 | #undef THIS_FILE 12 | static char THIS_FILE[] = __FILE__; 13 | #endif 14 | 15 | ///////////////////////////////////////////////////////////////////////////// 16 | // COutputBar 17 | 18 | COutputWnd::COutputWnd() noexcept 19 | { 20 | } 21 | 22 | COutputWnd::~COutputWnd() 23 | { 24 | } 25 | 26 | BEGIN_MESSAGE_MAP(COutputWnd, CDockablePane) 27 | ON_WM_CREATE() 28 | ON_WM_SIZE() 29 | END_MESSAGE_MAP() 30 | 31 | int COutputWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 32 | { 33 | if (CDockablePane::OnCreate(lpCreateStruct) == -1) 34 | return -1; 35 | 36 | CRect rectDummy; 37 | rectDummy.SetRectEmpty(); 38 | 39 | // 创建选项卡窗口: 40 | if (!m_wndTabs.Create(CMFCTabCtrl::STYLE_FLAT, rectDummy, this, 1)) 41 | { 42 | TRACE0("未能创建输出选项卡窗口\n"); 43 | return -1; // 未能创建 44 | } 45 | 46 | // 创建输出窗格: 47 | const DWORD dwStyle = LBS_NOINTEGRALHEIGHT | WS_CHILD | WS_VISIBLE | WS_HSCROLL | WS_VSCROLL; 48 | 49 | if (!m_wndOutputBuild.Create(dwStyle, rectDummy, &m_wndTabs, 2) || 50 | !m_wndOutputDebug.Create(dwStyle, rectDummy, &m_wndTabs, 3) || 51 | !m_wndOutputFind.Create(dwStyle, rectDummy, &m_wndTabs, 4)) 52 | { 53 | TRACE0("未能创建输出窗口\n"); 54 | return -1; // 未能创建 55 | } 56 | 57 | UpdateFonts(); 58 | 59 | CString strTabName; 60 | BOOL bNameValid; 61 | 62 | // 将列表窗口附加到选项卡: 63 | bNameValid = strTabName.LoadString(IDS_BUILD_TAB); 64 | ASSERT(bNameValid); 65 | m_wndTabs.AddTab(&m_wndOutputBuild, strTabName, (UINT)0); 66 | bNameValid = strTabName.LoadString(IDS_DEBUG_TAB); 67 | ASSERT(bNameValid); 68 | m_wndTabs.AddTab(&m_wndOutputDebug, strTabName, (UINT)1); 69 | bNameValid = strTabName.LoadString(IDS_FIND_TAB); 70 | ASSERT(bNameValid); 71 | m_wndTabs.AddTab(&m_wndOutputFind, strTabName, (UINT)2); 72 | 73 | // 使用一些虚拟文本填写输出选项卡(无需复杂数据) 74 | FillBuildWindow(); 75 | FillDebugWindow(); 76 | FillFindWindow(); 77 | 78 | return 0; 79 | } 80 | 81 | void COutputWnd::OnSize(UINT nType, int cx, int cy) 82 | { 83 | CDockablePane::OnSize(nType, cx, cy); 84 | 85 | // 选项卡控件应覆盖整个工作区: 86 | m_wndTabs.SetWindowPos (nullptr, -1, -1, cx, cy, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOZORDER); 87 | } 88 | 89 | void COutputWnd::AdjustHorzScroll(CListBox& wndListBox) 90 | { 91 | CClientDC dc(this); 92 | CFont* pOldFont = dc.SelectObject(&afxGlobalData.fontRegular); 93 | 94 | int cxExtentMax = 0; 95 | 96 | for (int i = 0; i < wndListBox.GetCount(); i ++) 97 | { 98 | CString strItem; 99 | wndListBox.GetText(i, strItem); 100 | 101 | cxExtentMax = max(cxExtentMax, (int)dc.GetTextExtent(strItem).cx); 102 | } 103 | 104 | wndListBox.SetHorizontalExtent(cxExtentMax); 105 | dc.SelectObject(pOldFont); 106 | } 107 | 108 | void COutputWnd::FillBuildWindow() 109 | { 110 | m_wndOutputBuild.AddString(_T("生成输出正显示在此处。")); 111 | m_wndOutputBuild.AddString(_T("输出正显示在列表视图的行中")); 112 | m_wndOutputBuild.AddString(_T("但您可以根据需要更改其显示方式...")); 113 | } 114 | 115 | void COutputWnd::FillDebugWindow() 116 | { 117 | m_wndOutputDebug.AddString(_T("调试输出正显示在此处。")); 118 | m_wndOutputDebug.AddString(_T("输出正显示在列表视图的行中")); 119 | m_wndOutputDebug.AddString(_T("但您可以根据需要更改其显示方式...")); 120 | } 121 | 122 | void COutputWnd::FillFindWindow() 123 | { 124 | m_wndOutputFind.AddString(_T("查找输出正显示在此处。")); 125 | m_wndOutputFind.AddString(_T("输出正显示在列表视图的行中")); 126 | m_wndOutputFind.AddString(_T("但您可以根据需要更改其显示方式...")); 127 | } 128 | 129 | void COutputWnd::UpdateFonts() 130 | { 131 | m_wndOutputBuild.SetFont(&afxGlobalData.fontRegular); 132 | m_wndOutputDebug.SetFont(&afxGlobalData.fontRegular); 133 | m_wndOutputFind.SetFont(&afxGlobalData.fontRegular); 134 | } 135 | 136 | ///////////////////////////////////////////////////////////////////////////// 137 | // COutputList1 138 | 139 | COutputList::COutputList() noexcept 140 | { 141 | } 142 | 143 | COutputList::~COutputList() 144 | { 145 | } 146 | 147 | BEGIN_MESSAGE_MAP(COutputList, CListBox) 148 | ON_WM_CONTEXTMENU() 149 | ON_COMMAND(ID_EDIT_COPY, OnEditCopy) 150 | ON_COMMAND(ID_EDIT_CLEAR, OnEditClear) 151 | ON_COMMAND(ID_VIEW_OUTPUTWND, OnViewOutput) 152 | ON_WM_WINDOWPOSCHANGING() 153 | END_MESSAGE_MAP() 154 | ///////////////////////////////////////////////////////////////////////////// 155 | // COutputList 消息处理程序 156 | 157 | void COutputList::OnContextMenu(CWnd* /*pWnd*/, CPoint point) 158 | { 159 | CMenu menu; 160 | menu.LoadMenu(IDR_OUTPUT_POPUP); 161 | 162 | CMenu* pSumMenu = menu.GetSubMenu(0); 163 | 164 | if (AfxGetMainWnd()->IsKindOf(RUNTIME_CLASS(CMDIFrameWndEx))) 165 | { 166 | CMFCPopupMenu* pPopupMenu = new CMFCPopupMenu; 167 | 168 | if (!pPopupMenu->Create(this, point.x, point.y, (HMENU)pSumMenu->m_hMenu, FALSE, TRUE)) 169 | return; 170 | 171 | ((CMDIFrameWndEx*)AfxGetMainWnd())->OnShowPopupMenu(pPopupMenu); 172 | UpdateDialogControls(this, FALSE); 173 | } 174 | 175 | SetFocus(); 176 | } 177 | 178 | void COutputList::OnEditCopy() 179 | { 180 | MessageBox(_T("复制输出")); 181 | } 182 | 183 | void COutputList::OnEditClear() 184 | { 185 | MessageBox(_T("清除输出")); 186 | } 187 | 188 | void COutputList::OnViewOutput() 189 | { 190 | CDockablePane* pParentBar = DYNAMIC_DOWNCAST(CDockablePane, GetOwner()); 191 | CMDIFrameWndEx* pMainFrame = DYNAMIC_DOWNCAST(CMDIFrameWndEx, GetTopLevelFrame()); 192 | 193 | if (pMainFrame != nullptr && pParentBar != nullptr) 194 | { 195 | pMainFrame->SetFocus(); 196 | pMainFrame->ShowPane(pParentBar, FALSE, FALSE, FALSE); 197 | pMainFrame->RecalcLayout(); 198 | 199 | } 200 | } 201 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/OutputWnd.h: -------------------------------------------------------------------------------- 1 |  2 | #pragma once 3 | 4 | ///////////////////////////////////////////////////////////////////////////// 5 | // COutputList 窗口 6 | 7 | class COutputList : public CListBox 8 | { 9 | // 构造 10 | public: 11 | COutputList() noexcept; 12 | 13 | // 实现 14 | public: 15 | virtual ~COutputList(); 16 | 17 | protected: 18 | afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); 19 | afx_msg void OnEditCopy(); 20 | afx_msg void OnEditClear(); 21 | afx_msg void OnViewOutput(); 22 | 23 | DECLARE_MESSAGE_MAP() 24 | }; 25 | 26 | class COutputWnd : public CDockablePane 27 | { 28 | // 构造 29 | public: 30 | COutputWnd() noexcept; 31 | 32 | void UpdateFonts(); 33 | 34 | // 特性 35 | protected: 36 | CMFCTabCtrl m_wndTabs; 37 | 38 | COutputList m_wndOutputBuild; 39 | COutputList m_wndOutputDebug; 40 | COutputList m_wndOutputFind; 41 | 42 | protected: 43 | void FillBuildWindow(); 44 | void FillDebugWindow(); 45 | void FillFindWindow(); 46 | 47 | void AdjustHorzScroll(CListBox& wndListBox); 48 | 49 | // 实现 50 | public: 51 | virtual ~COutputWnd(); 52 | 53 | protected: 54 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 55 | afx_msg void OnSize(UINT nType, int cx, int cy); 56 | 57 | DECLARE_MESSAGE_MAP() 58 | }; 59 | 60 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/PropertiesWnd.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "pch.h" 3 | #include "framework.h" 4 | 5 | #include "PropertiesWnd.h" 6 | #include "Resource.h" 7 | #include "MainFrm.h" 8 | #include "ComputerGraphicDDA.h" 9 | 10 | #ifdef _DEBUG 11 | #undef THIS_FILE 12 | static char THIS_FILE[]=__FILE__; 13 | #define new DEBUG_NEW 14 | #endif 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // CResourceViewBar 18 | 19 | CPropertiesWnd::CPropertiesWnd() noexcept 20 | { 21 | m_nComboHeight = 0; 22 | } 23 | 24 | CPropertiesWnd::~CPropertiesWnd() 25 | { 26 | } 27 | 28 | BEGIN_MESSAGE_MAP(CPropertiesWnd, CDockablePane) 29 | ON_WM_CREATE() 30 | ON_WM_SIZE() 31 | ON_COMMAND(ID_EXPAND_ALL, OnExpandAllProperties) 32 | ON_UPDATE_COMMAND_UI(ID_EXPAND_ALL, OnUpdateExpandAllProperties) 33 | ON_COMMAND(ID_SORTPROPERTIES, OnSortProperties) 34 | ON_UPDATE_COMMAND_UI(ID_SORTPROPERTIES, OnUpdateSortProperties) 35 | ON_COMMAND(ID_PROPERTIES1, OnProperties1) 36 | ON_UPDATE_COMMAND_UI(ID_PROPERTIES1, OnUpdateProperties1) 37 | ON_COMMAND(ID_PROPERTIES2, OnProperties2) 38 | ON_UPDATE_COMMAND_UI(ID_PROPERTIES2, OnUpdateProperties2) 39 | ON_WM_SETFOCUS() 40 | ON_WM_SETTINGCHANGE() 41 | END_MESSAGE_MAP() 42 | 43 | ///////////////////////////////////////////////////////////////////////////// 44 | // CResourceViewBar 消息处理程序 45 | 46 | void CPropertiesWnd::AdjustLayout() 47 | { 48 | if (GetSafeHwnd () == nullptr || (AfxGetMainWnd() != nullptr && AfxGetMainWnd()->IsIconic())) 49 | { 50 | return; 51 | } 52 | 53 | CRect rectClient; 54 | GetClientRect(rectClient); 55 | 56 | int cyTlb = m_wndToolBar.CalcFixedLayout(FALSE, TRUE).cy; 57 | 58 | m_wndObjectCombo.SetWindowPos(nullptr, rectClient.left, rectClient.top, rectClient.Width(), m_nComboHeight, SWP_NOACTIVATE | SWP_NOZORDER); 59 | m_wndToolBar.SetWindowPos(nullptr, rectClient.left, rectClient.top + m_nComboHeight, rectClient.Width(), cyTlb, SWP_NOACTIVATE | SWP_NOZORDER); 60 | m_wndPropList.SetWindowPos(nullptr, rectClient.left, rectClient.top + m_nComboHeight + cyTlb, rectClient.Width(), rectClient.Height() -(m_nComboHeight+cyTlb), SWP_NOACTIVATE | SWP_NOZORDER); 61 | } 62 | 63 | int CPropertiesWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 64 | { 65 | if (CDockablePane::OnCreate(lpCreateStruct) == -1) 66 | return -1; 67 | 68 | CRect rectDummy; 69 | rectDummy.SetRectEmpty(); 70 | 71 | // 创建组合: 72 | const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE | CBS_DROPDOWNLIST | WS_BORDER | CBS_SORT | WS_CLIPSIBLINGS | WS_CLIPCHILDREN; 73 | 74 | if (!m_wndObjectCombo.Create(dwViewStyle, rectDummy, this, 1)) 75 | { 76 | TRACE0("未能创建属性组合 \n"); 77 | return -1; // 未能创建 78 | } 79 | 80 | m_wndObjectCombo.AddString(_T("应用程序")); 81 | m_wndObjectCombo.AddString(_T("属性窗口")); 82 | m_wndObjectCombo.SetCurSel(0); 83 | 84 | CRect rectCombo; 85 | m_wndObjectCombo.GetClientRect (&rectCombo); 86 | 87 | m_nComboHeight = rectCombo.Height(); 88 | 89 | if (!m_wndPropList.Create(WS_VISIBLE | WS_CHILD, rectDummy, this, 2)) 90 | { 91 | TRACE0("未能创建属性网格\n"); 92 | return -1; // 未能创建 93 | } 94 | 95 | InitPropList(); 96 | 97 | m_wndToolBar.Create(this, AFX_DEFAULT_TOOLBAR_STYLE, IDR_PROPERTIES); 98 | m_wndToolBar.LoadToolBar(IDR_PROPERTIES, 0, 0, TRUE /* 已锁定*/); 99 | m_wndToolBar.CleanUpLockedImages(); 100 | m_wndToolBar.LoadBitmap(theApp.m_bHiColorIcons ? IDB_PROPERTIES_HC : IDR_PROPERTIES, 0, 0, TRUE /* 锁定*/); 101 | 102 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() | CBRS_TOOLTIPS | CBRS_FLYBY); 103 | m_wndToolBar.SetPaneStyle(m_wndToolBar.GetPaneStyle() & ~(CBRS_GRIPPER | CBRS_SIZE_DYNAMIC | CBRS_BORDER_TOP | CBRS_BORDER_BOTTOM | CBRS_BORDER_LEFT | CBRS_BORDER_RIGHT)); 104 | m_wndToolBar.SetOwner(this); 105 | 106 | // 所有命令将通过此控件路由,而不是通过主框架路由: 107 | m_wndToolBar.SetRouteCommandsViaFrame(FALSE); 108 | 109 | AdjustLayout(); 110 | return 0; 111 | } 112 | 113 | void CPropertiesWnd::OnSize(UINT nType, int cx, int cy) 114 | { 115 | CDockablePane::OnSize(nType, cx, cy); 116 | AdjustLayout(); 117 | } 118 | 119 | void CPropertiesWnd::OnExpandAllProperties() 120 | { 121 | m_wndPropList.ExpandAll(); 122 | } 123 | 124 | void CPropertiesWnd::OnUpdateExpandAllProperties(CCmdUI* /* pCmdUI */) 125 | { 126 | } 127 | 128 | void CPropertiesWnd::OnSortProperties() 129 | { 130 | m_wndPropList.SetAlphabeticMode(!m_wndPropList.IsAlphabeticMode()); 131 | } 132 | 133 | void CPropertiesWnd::OnUpdateSortProperties(CCmdUI* pCmdUI) 134 | { 135 | pCmdUI->SetCheck(m_wndPropList.IsAlphabeticMode()); 136 | } 137 | 138 | void CPropertiesWnd::OnProperties1() 139 | { 140 | // TODO: 在此处添加命令处理程序代码 141 | } 142 | 143 | void CPropertiesWnd::OnUpdateProperties1(CCmdUI* /*pCmdUI*/) 144 | { 145 | // TODO: 在此处添加命令更新 UI 处理程序代码 146 | } 147 | 148 | void CPropertiesWnd::OnProperties2() 149 | { 150 | // TODO: 在此处添加命令处理程序代码 151 | } 152 | 153 | void CPropertiesWnd::OnUpdateProperties2(CCmdUI* /*pCmdUI*/) 154 | { 155 | // TODO: 在此处添加命令更新 UI 处理程序代码 156 | } 157 | 158 | void CPropertiesWnd::InitPropList() 159 | { 160 | SetPropListFont(); 161 | 162 | m_wndPropList.EnableHeaderCtrl(FALSE); 163 | m_wndPropList.EnableDescriptionArea(); 164 | m_wndPropList.SetVSDotNetLook(); 165 | m_wndPropList.MarkModifiedProperties(); 166 | 167 | CMFCPropertyGridProperty* pGroup1 = new CMFCPropertyGridProperty(_T("外观")); 168 | 169 | pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("三维外观"), (_variant_t) false, _T("指定窗口的字体不使用粗体,并且控件将使用三维边框"))); 170 | 171 | CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("边框"), _T("对话框外框"), _T("其中之一: “无”、“细”、“可调整大小”或“对话框外框”")); 172 | pProp->AddOption(_T("无")); 173 | pProp->AddOption(_T("细")); 174 | pProp->AddOption(_T("可调整大小")); 175 | pProp->AddOption(_T("对话框外框")); 176 | pProp->AllowEdit(FALSE); 177 | 178 | pGroup1->AddSubItem(pProp); 179 | pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("标题"), (_variant_t) _T("关于"), _T("指定窗口标题栏中显示的文本"))); 180 | 181 | m_wndPropList.AddProperty(pGroup1); 182 | 183 | CMFCPropertyGridProperty* pSize = new CMFCPropertyGridProperty(_T("窗口大小"), 0, TRUE); 184 | 185 | pProp = new CMFCPropertyGridProperty(_T("高度"), (_variant_t) 250l, _T("指定窗口的高度")); 186 | pProp->EnableSpinControl(TRUE, 50, 300); 187 | pSize->AddSubItem(pProp); 188 | 189 | pProp = new CMFCPropertyGridProperty( _T("宽度"), (_variant_t) 150l, _T("指定窗口的宽度")); 190 | pProp->EnableSpinControl(TRUE, 50, 200); 191 | pSize->AddSubItem(pProp); 192 | 193 | m_wndPropList.AddProperty(pSize); 194 | 195 | CMFCPropertyGridProperty* pGroup2 = new CMFCPropertyGridProperty(_T("字体")); 196 | 197 | LOGFONT lf; 198 | CFont* font = CFont::FromHandle((HFONT) GetStockObject(DEFAULT_GUI_FONT)); 199 | font->GetLogFont(&lf); 200 | 201 | _tcscpy_s(lf.lfFaceName, _T("宋体, Arial")); 202 | 203 | pGroup2->AddSubItem(new CMFCPropertyGridFontProperty(_T("字体"), lf, CF_EFFECTS | CF_SCREENFONTS, _T("指定窗口的默认字体"))); 204 | pGroup2->AddSubItem(new CMFCPropertyGridProperty(_T("使用系统字体"), (_variant_t) true, _T("指定窗口使用“MS Shell Dlg”字体"))); 205 | 206 | m_wndPropList.AddProperty(pGroup2); 207 | 208 | CMFCPropertyGridProperty* pGroup3 = new CMFCPropertyGridProperty(_T("杂项")); 209 | pProp = new CMFCPropertyGridProperty(_T("(名称)"), _T("应用程序")); 210 | pProp->Enable(FALSE); 211 | pGroup3->AddSubItem(pProp); 212 | 213 | CMFCPropertyGridColorProperty* pColorProp = new CMFCPropertyGridColorProperty(_T("窗口颜色"), RGB(210, 192, 254), nullptr, _T("指定默认的窗口颜色")); 214 | pColorProp->EnableOtherButton(_T("其他...")); 215 | pColorProp->EnableAutomaticButton(_T("默认"), ::GetSysColor(COLOR_3DFACE)); 216 | pGroup3->AddSubItem(pColorProp); 217 | 218 | static const TCHAR szFilter[] = _T("图标文件(*.ico)|*.ico|所有文件(*.*)|*.*||"); 219 | pGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("图标"), TRUE, _T(""), _T("ico"), 0, szFilter, _T("指定窗口图标"))); 220 | 221 | pGroup3->AddSubItem(new CMFCPropertyGridFileProperty(_T("文件夹"), _T("c:\\"))); 222 | 223 | m_wndPropList.AddProperty(pGroup3); 224 | 225 | CMFCPropertyGridProperty* pGroup4 = new CMFCPropertyGridProperty(_T("层次结构")); 226 | 227 | CMFCPropertyGridProperty* pGroup41 = new CMFCPropertyGridProperty(_T("第一个子级")); 228 | pGroup4->AddSubItem(pGroup41); 229 | 230 | CMFCPropertyGridProperty* pGroup411 = new CMFCPropertyGridProperty(_T("第二个子级")); 231 | pGroup41->AddSubItem(pGroup411); 232 | 233 | pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 1"), (_variant_t) _T("值 1"), _T("此为说明"))); 234 | pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 2"), (_variant_t) _T("值 2"), _T("此为说明"))); 235 | pGroup411->AddSubItem(new CMFCPropertyGridProperty(_T("项 3"), (_variant_t) _T("值 3"), _T("此为说明"))); 236 | 237 | pGroup4->Expand(FALSE); 238 | m_wndPropList.AddProperty(pGroup4); 239 | } 240 | 241 | void CPropertiesWnd::OnSetFocus(CWnd* pOldWnd) 242 | { 243 | CDockablePane::OnSetFocus(pOldWnd); 244 | m_wndPropList.SetFocus(); 245 | } 246 | 247 | void CPropertiesWnd::OnSettingChange(UINT uFlags, LPCTSTR lpszSection) 248 | { 249 | CDockablePane::OnSettingChange(uFlags, lpszSection); 250 | SetPropListFont(); 251 | } 252 | 253 | void CPropertiesWnd::SetPropListFont() 254 | { 255 | ::DeleteObject(m_fntPropList.Detach()); 256 | 257 | LOGFONT lf; 258 | afxGlobalData.fontRegular.GetLogFont(&lf); 259 | 260 | NONCLIENTMETRICS info; 261 | info.cbSize = sizeof(info); 262 | 263 | afxGlobalData.GetNonClientMetrics(info); 264 | 265 | lf.lfHeight = info.lfMenuFont.lfHeight; 266 | lf.lfWeight = info.lfMenuFont.lfWeight; 267 | lf.lfItalic = info.lfMenuFont.lfItalic; 268 | 269 | m_fntPropList.CreateFontIndirect(&lf); 270 | 271 | m_wndPropList.SetFont(&m_fntPropList); 272 | m_wndObjectCombo.SetFont(&m_fntPropList); 273 | } 274 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/PropertiesWnd.h: -------------------------------------------------------------------------------- 1 |  2 | #pragma once 3 | 4 | class CPropertiesToolBar : public CMFCToolBar 5 | { 6 | public: 7 | virtual void OnUpdateCmdUI(CFrameWnd* /*pTarget*/, BOOL bDisableIfNoHndler) 8 | { 9 | CMFCToolBar::OnUpdateCmdUI((CFrameWnd*) GetOwner(), bDisableIfNoHndler); 10 | } 11 | 12 | virtual BOOL AllowShowOnList() const { return FALSE; } 13 | }; 14 | 15 | class CPropertiesWnd : public CDockablePane 16 | { 17 | // 构造 18 | public: 19 | CPropertiesWnd() noexcept; 20 | 21 | void AdjustLayout(); 22 | 23 | // 特性 24 | public: 25 | void SetVSDotNetLook(BOOL bSet) 26 | { 27 | m_wndPropList.SetVSDotNetLook(bSet); 28 | m_wndPropList.SetGroupNameFullWidth(bSet); 29 | } 30 | 31 | protected: 32 | CFont m_fntPropList; 33 | CComboBox m_wndObjectCombo; 34 | CPropertiesToolBar m_wndToolBar; 35 | CMFCPropertyGridCtrl m_wndPropList; 36 | 37 | // 实现 38 | public: 39 | virtual ~CPropertiesWnd(); 40 | 41 | protected: 42 | afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 43 | afx_msg void OnSize(UINT nType, int cx, int cy); 44 | afx_msg void OnExpandAllProperties(); 45 | afx_msg void OnUpdateExpandAllProperties(CCmdUI* pCmdUI); 46 | afx_msg void OnSortProperties(); 47 | afx_msg void OnUpdateSortProperties(CCmdUI* pCmdUI); 48 | afx_msg void OnProperties1(); 49 | afx_msg void OnUpdateProperties1(CCmdUI* pCmdUI); 50 | afx_msg void OnProperties2(); 51 | afx_msg void OnUpdateProperties2(CCmdUI* pCmdUI); 52 | afx_msg void OnSetFocus(CWnd* pOldWnd); 53 | afx_msg void OnSettingChange(UINT uFlags, LPCTSTR lpszSection); 54 | 55 | DECLARE_MESSAGE_MAP() 56 | 57 | void InitPropList(); 58 | void SetPropListFont(); 59 | 60 | int m_nComboHeight; 61 | }; 62 | 63 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/SetCharDlg.cpp: -------------------------------------------------------------------------------- 1 | // SetCharDlg.cpp: 实现文件 2 | // 3 | 4 | #include "pch.h" 5 | #include "ComputerGraphicDDA.h" 6 | #include "SetCharDlg.h" 7 | #include "afxdialogex.h" 8 | 9 | 10 | // CSetCharDlg 对话框 11 | 12 | IMPLEMENT_DYNAMIC(CSetCharDlg, CDialogEx) 13 | 14 | CSetCharDlg::CSetCharDlg(CWnd* pParent /*=nullptr*/) 15 | : CDialogEx(IDD_CHARBOX, pParent) 16 | , m_strString(_T("")) 17 | , m_nX(0) 18 | , m_nY(0) 19 | 20 | { 21 | m_clrText = RGB(0, 0, 0); 22 | 23 | } 24 | 25 | CSetCharDlg::~CSetCharDlg() 26 | { 27 | } 28 | 29 | void CSetCharDlg::DoDataExchange(CDataExchange* pDX) 30 | { 31 | CDialogEx::DoDataExchange(pDX); 32 | DDX_Text(pDX, ID_EDIT_CHAR, m_strString); 33 | DDX_Text(pDX, ID_EDIT_X, m_nX); 34 | DDX_Text(pDX, ID_EDIT_Y, m_nY); 35 | } 36 | 37 | 38 | BEGIN_MESSAGE_MAP(CSetCharDlg, CDialogEx) 39 | ON_BN_CLICKED(IDC_BUTTON_FONT, &CSetCharDlg::OnClickedButtonFont) 40 | END_MESSAGE_MAP() 41 | 42 | 43 | // CSetCharDlg 消息处理程序 44 | 45 | 46 | void CSetCharDlg::OnClickedButtonFont() 47 | { 48 | // TODO: 在此添加控件通知处理程序代码 49 | CFontDialog dlg; 50 | if (dlg.DoModal() == IDOK) 51 | { 52 | m_fnt.DeleteObject(); 53 | LOGFONT LogFnt; 54 | dlg.GetCurrentFont(&LogFnt);//保存所选字体 55 | m_fnt.CreateFontIndirect(&LogFnt);//创建所选字体 56 | m_clrText = dlg.GetColor();//获得所选颜色 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/SetCharDlg.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | 4 | // CSetCharDlg 对话框 5 | 6 | class CSetCharDlg : public CDialogEx 7 | { 8 | DECLARE_DYNAMIC(CSetCharDlg) 9 | 10 | public: 11 | CSetCharDlg(CWnd* pParent = nullptr); // 标准构造函数 12 | CFont m_fnt;//保存字体 13 | COLORREF m_clrText;//保存颜 14 | virtual ~CSetCharDlg(); 15 | 16 | // 对话框数据 17 | #ifdef AFX_DESIGN_TIME 18 | enum { IDD = IDD_CHARBOX }; 19 | #endif 20 | 21 | protected: 22 | virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持 23 | 24 | DECLARE_MESSAGE_MAP() 25 | public: 26 | CString m_strString; 27 | int m_nX; 28 | int m_nY; 29 | afx_msg void OnClickedButtonFont(); 30 | }; 31 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ViewTree.cpp: -------------------------------------------------------------------------------- 1 |  2 | #include "pch.h" 3 | #include "framework.h" 4 | #include "ViewTree.h" 5 | 6 | #ifdef _DEBUG 7 | #define new DEBUG_NEW 8 | #undef THIS_FILE 9 | static char THIS_FILE[] = __FILE__; 10 | #endif 11 | 12 | ///////////////////////////////////////////////////////////////////////////// 13 | // CViewTree 14 | 15 | CViewTree::CViewTree() noexcept 16 | { 17 | } 18 | 19 | CViewTree::~CViewTree() 20 | { 21 | } 22 | 23 | BEGIN_MESSAGE_MAP(CViewTree, CTreeCtrl) 24 | END_MESSAGE_MAP() 25 | 26 | ///////////////////////////////////////////////////////////////////////////// 27 | // CViewTree 消息处理程序 28 | 29 | BOOL CViewTree::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 30 | { 31 | BOOL bRes = CTreeCtrl::OnNotify(wParam, lParam, pResult); 32 | 33 | NMHDR* pNMHDR = (NMHDR*)lParam; 34 | ASSERT(pNMHDR != nullptr); 35 | 36 | #pragma warning(suppress : 26454) 37 | if (pNMHDR && pNMHDR->code == TTN_SHOW && GetToolTips() != nullptr) 38 | { 39 | GetToolTips()->SetWindowPos(&wndTop, -1, -1, -1, -1, SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOSIZE); 40 | } 41 | 42 | return bRes; 43 | } 44 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/ViewTree.h: -------------------------------------------------------------------------------- 1 |  2 | #pragma once 3 | 4 | ///////////////////////////////////////////////////////////////////////////// 5 | // CViewTree 窗口 6 | 7 | class CViewTree : public CTreeCtrl 8 | { 9 | // 构造 10 | public: 11 | CViewTree() noexcept; 12 | 13 | // 重写 14 | protected: 15 | virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult); 16 | 17 | // 实现 18 | public: 19 | virtual ~CViewTree(); 20 | 21 | protected: 22 | DECLARE_MESSAGE_MAP() 23 | }; 24 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/framework.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifndef VC_EXTRALEAN 4 | #define VC_EXTRALEAN // 从 Windows 头中排除极少使用的资料 5 | #endif 6 | 7 | #include "targetver.h" 8 | 9 | #define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // 某些 CString 构造函数将是显式的 10 | 11 | // 关闭 MFC 的一些常见且经常可放心忽略的隐藏警告消息 12 | #define _AFX_ALL_WARNINGS 13 | 14 | #include // MFC 核心组件和标准组件 15 | #include // MFC 扩展 16 | 17 | 18 | #include // MFC 自动化类 19 | 20 | 21 | 22 | #ifndef _AFX_NO_OLE_SUPPORT 23 | #include // MFC 对 Internet Explorer 4 公共控件的支持 24 | #endif 25 | #ifndef _AFX_NO_AFXCMN_SUPPORT 26 | #include // MFC 对 Windows 公共控件的支持 27 | #endif // _AFX_NO_AFXCMN_SUPPORT 28 | 29 | #include // MFC 支持功能区和控制条 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | #ifdef _UNICODE 40 | #if defined _M_IX86 41 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") 42 | #elif defined _M_X64 43 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") 44 | #else 45 | #pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") 46 | #endif 47 | #endif 48 | 49 | 50 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/pch.cpp: -------------------------------------------------------------------------------- 1 | // pch.cpp: 与预编译标头对应的源文件 2 | 3 | #include "pch.h" 4 | 5 | // 当使用预编译的头时,需要使用此源文件,编译才能成功。 6 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/pch.h: -------------------------------------------------------------------------------- 1 | // pch.h: 这是预编译标头文件。 2 | // 下方列出的文件仅编译一次,提高了将来生成的生成性能。 3 | // 这还将影响 IntelliSense 性能,包括代码完成和许多代码浏览功能。 4 | // 但是,如果此处列出的文件中的任何一个在生成之间有更新,它们全部都将被重新编译。 5 | // 请勿在此处添加要频繁更新的文件,这将使得性能优势无效。 6 | 7 | #ifndef PCH_H 8 | #define PCH_H 9 | 10 | // 添加要在此处预编译的标头 11 | #include "framework.h" 12 | 13 | #endif //PCH_H 14 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDA.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDA.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDA.rc2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDA.rc2 -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDADoc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/ComputerGraphicDDADoc.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/Toolbar.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/Toolbar256.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/Toolbar256.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/bitmap1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/bitmap1.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/class_view.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/class_view.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/class_view_hc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/class_view_hc.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/classview.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/classview.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/classview_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/classview_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/explorer.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/explorer.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/explorer_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/explorer_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/file_view.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/file_view.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/file_view_hc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/file_view_hc.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/fileview.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/fileview.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/fileview_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/fileview_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/menuimages.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/menuimages.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/menuimages_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/menuimages_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/output_wnd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/output_wnd.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/output_wnd_hc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/output_wnd_hc.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/properties.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/properties.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/properties_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/properties_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/properties_wnd.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/properties_wnd.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/properties_wnd_hc.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/properties_wnd_hc.ico -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/sort.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/sort.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/sort_hc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/sort_hc.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/res/userimages.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/res/userimages.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ 生成的包含文件。 3 | // 供 ComputerGraphicDDA.rc 使用 4 | // 5 | #define IDD_ABOUTBOX 100 6 | #define IDP_OLE_INIT_FAILED 100 7 | #define IDR_POPUP_EDIT 119 8 | #define ID_STATUSBAR_PANE1 120 9 | #define ID_STATUSBAR_PANE2 121 10 | #define IDS_STATUS_PANE1 122 11 | #define IDS_STATUS_PANE2 123 12 | #define IDS_TOOLBAR_STANDARD 124 13 | #define IDS_TOOLBAR_CUSTOMIZE 125 14 | #define ID_VIEW_CUSTOMIZE 126 15 | #define IDR_MAINFRAME 128 16 | #define IDR_MAINFRAME_256 129 17 | #define IDR_ComputerGraphicDDATYPE 130 18 | #define ID_WINDOW_MANAGER 131 19 | #define ID_VIEW_FILEVIEW 133 20 | #define ID_VIEW_CLASSVIEW 134 21 | #define ID_PROPERTIES 135 22 | #define ID_OPEN 136 23 | #define ID_OPEN_WITH 137 24 | #define ID_DUMMY_COMPILE 138 25 | #define ID_CLASS_ADD_MEMBER_FUNCTION 139 26 | #define ID_CLASS_ADD_MEMBER_VARIABLE 140 27 | #define ID_CLASS_DEFINITION 141 28 | #define ID_CLASS_PROPERTIES 142 29 | #define ID_NEW_FOLDER 143 30 | #define ID_SORT_MENU 144 31 | #define ID_SORTING_GROUPBYTYPE 145 32 | #define ID_SORTING_SORTALPHABETIC 146 33 | #define ID_SORTING_SORTBYTYPE 147 34 | #define ID_SORTING_SORTBYACCESS 148 35 | #define ID_VIEW_OUTPUTWND 149 36 | #define ID_VIEW_PROPERTIESWND 150 37 | #define ID_SORTPROPERTIES 151 38 | #define ID_PROPERTIES1 152 39 | #define ID_PROPERTIES2 153 40 | #define ID_EXPAND_ALL 154 41 | #define IDS_FILE_VIEW 155 42 | #define IDS_CLASS_VIEW 156 43 | #define IDS_OUTPUT_WND 157 44 | #define IDS_PROPERTIES_WND 158 45 | #define IDI_FILE_VIEW 161 46 | #define IDI_FILE_VIEW_HC 162 47 | #define IDI_CLASS_VIEW 163 48 | #define IDI_CLASS_VIEW_HC 164 49 | #define IDI_OUTPUT_WND 165 50 | #define IDI_OUTPUT_WND_HC 166 51 | #define IDI_PROPERTIES_WND 167 52 | #define IDI_PROPERTIES_WND_HC 168 53 | #define IDR_EXPLORER 169 54 | #define IDB_EXPLORER_24 170 55 | #define IDR_SORT 171 56 | #define IDB_SORT_24 172 57 | #define IDR_POPUP_SORT 173 58 | #define IDR_POPUP_EXPLORER 174 59 | #define IDB_FILE_VIEW 175 60 | #define IDB_FILE_VIEW_24 176 61 | #define IDB_CLASS_VIEW 177 62 | #define IDB_CLASS_VIEW_24 178 63 | #define IDR_MENU_IMAGES 179 64 | #define IDB_MENU_IMAGES_24 180 65 | #define ID_TOOLS_MACRO 181 66 | #define IDR_OUTPUT_POPUP 182 67 | #define IDR_PROPERTIES 183 68 | #define IDB_PROPERTIES_HC 184 69 | #define IDR_THEME_MENU 200 70 | #define ID_SET_STYLE 201 71 | #define ID_VIEW_APPLOOK_WIN_2000 205 72 | #define ID_VIEW_APPLOOK_OFF_XP 206 73 | #define ID_VIEW_APPLOOK_WIN_XP 207 74 | #define ID_VIEW_APPLOOK_OFF_2003 208 75 | #define ID_VIEW_APPLOOK_VS_2005 209 76 | #define ID_VIEW_APPLOOK_VS_2008 210 77 | #define ID_VIEW_APPLOOK_OFF_2007_BLUE 215 78 | #define ID_VIEW_APPLOOK_OFF_2007_BLACK 216 79 | #define ID_VIEW_APPLOOK_OFF_2007_SILVER 217 80 | #define ID_VIEW_APPLOOK_OFF_2007_AQUA 218 81 | #define ID_VIEW_APPLOOK_WINDOWS_7 219 82 | #define IDS_BUILD_TAB 300 83 | #define IDS_DEBUG_TAB 301 84 | #define IDS_FIND_TAB 302 85 | #define IDS_EXPLORER 305 86 | #define IDS_EDIT_MENU 306 87 | #define IDD_CHARBOX 310 88 | #define IDB_BITMAP1 315 89 | #define ID_EDIT_CHAR 1000 90 | #define ID_EDIT_X 1001 91 | #define ID_EDIT_Y 1002 92 | #define IDC_BUTTON_FONT 1003 93 | #define ID_Menu 32771 94 | #define ID_32772 32772 95 | #define ID_DRAW_DDALINE 32773 96 | #define ID_32774 32774 97 | #define ID_32775 32775 98 | #define ID_32776 32776 99 | #define ID_32777 32777 100 | #define ID_32778 32778 101 | #define ID_32779 32779 102 | #define ID_DRAW_MIDLINE 32780 103 | #define ID_DRAW_BCIRCLE 32781 104 | #define ID_DRAW_PNCIRCLE 32782 105 | #define ID_CURVE_BEZIER 32783 106 | #define ID_CURVE_BSAMPLE 32784 107 | #define ID_CURVE_HERMITE 32785 108 | #define ID_32786 32786 109 | #define ID_32787 32787 110 | #define ID_32788 32788 111 | #define ID_32789 32789 112 | #define ID_TRANS_MOVE 32790 113 | #define ID_TRANS_ROTATE 32791 114 | #define ID_TRANS_ZOOM 32792 115 | #define ID_TRANS_SYMMETRY 32793 116 | #define ID_32794 32794 117 | #define ID_32795 32795 118 | #define ID_32796 32796 119 | #define ID_FILL_SCANLINE 32797 120 | #define ID_FILL_EDGE 32798 121 | #define ID_FILL_SEED 32799 122 | #define ID_32800 32800 123 | #define ID_32801 32801 124 | #define ID_32802 32802 125 | #define ID_32803 32803 126 | #define ID_CUT_CS 32804 127 | #define ID_CUT_MIDDLE 32805 128 | #define ID_CUT_LIANG 32806 129 | #define ID_CUT_POLYGON 32807 130 | #define ID_32808 32808 131 | #define ID_SET_COLOR 32809 132 | #define ID_32810 32810 133 | #define ID_ONSET_CHAR 32811 134 | #define ID_SET_CHAR 32812 135 | #define ID_32813 32813 136 | #define ID_CUT_CIRCLE 32814 137 | #define ID_32815 32815 138 | #define ID_BLANKING 32816 139 | #define ID_32817 32817 140 | #define ID_32818 32818 141 | #define ID_LAMBERT 32819 142 | #define ID_PHONG 32820 143 | 144 | // Next default values for new objects 145 | // 146 | #ifdef APSTUDIO_INVOKED 147 | #ifndef APSTUDIO_READONLY_SYMBOLS 148 | #define _APS_NEXT_RESOURCE_VALUE 316 149 | #define _APS_NEXT_COMMAND_VALUE 32821 150 | #define _APS_NEXT_CONTROL_VALUE 1004 151 | #define _APS_NEXT_SYMED_VALUE 310 152 | #endif 153 | #endif 154 | -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/senpai.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DDAKUN/WHU-RS-Coding-Assignment/46c644bc336e6a9b4ec7d3d262d8a78b223e2613/计算机图形学实习/ComputerGraphicDDA/senpai.bmp -------------------------------------------------------------------------------- /计算机图形学实习/ComputerGraphicDDA/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // 包括 SDKDDKVer.h 将定义可用的最高版本的 Windows 平台。 4 | 5 | // 如果要为以前的 Windows 平台生成应用程序,请包括 WinSDKVer.h,并将 6 | // 将 _WIN32_WINNT 宏设置为要支持的平台,然后再包括 SDKDDKVer.h。 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /计算机图形学实习/README.md: -------------------------------------------------------------------------------- 1 | # Computer_Graphics 2 | 武汉大学 遥感学院 计算机图形学实习课程设计作业 3 | 包含如下功能: 4 | * 图形生成:DDA直线、Bezier曲线、Hermite曲线等 5 | * 图形填充:扫描线算法等 6 | * 图形变换:平移、缩放等 7 | * 图形裁剪:梁友栋算法、Cohen算法等 8 | * 字符生成 9 | * 基于圆环的消隐 10 | * 光照模型:Phong模型、Lambert模型等 11 | --------------------------------------------------------------------------------