构建三维世界(Construct 3D World)
- 项目背景:清华大学自动化系《面向对象程序设计》课程大作业,基于C++与MVC模式实现轻量级三维建模工具,获评A级优秀代码
- 技术栈:C++11、MVC架构、面向对象设计
- 核心功能:
- 实现三维模型(OBJ格式)的导入与导出,支持Face3D(三角形面)和Line3D(空间线段)的动态增删改查;
- 提供模型统计功能(面/线/点数量、总面积、总长度、包围盒体积);
- 基于继承体系设计通用导入器(Importer)和导出器(Exporter),支持未来扩展多格式。
- 设计亮点:
- 严格遵循MVC模式,解耦界面(View)、控制器(Controller)与模型(Model);
- 封装可重用类(如
Point3D
、Face3D
、Line3D
),遵循SOLID原则; - 单例模式管理控制器,避免全局变量,确保代码健壮性;
- 符合清华大学自动化系编码规范(注释量≥1/3、命名规范、内存安全等)。
- 成果:课程成绩A(前10%),代码可被选为优秀范例供后续学生参考
- 其它:作者lx,仅供学习交流。
3D World Construction (Construct 3D World)
- Project Background: Developed a lightweight 3D modeling tool in C++ using MVC pattern for Tsinghua OOP course, awarded grade A for code quality and design.
- Tech Stack: C++11, MVC Architecture, OOP Design
- Key Features:
- Implemented OBJ file import/export with dynamic management of Face3D (triangular faces) and Line3D (3D lines);
- Provided statistical analysis (face/line/point counts, total area/length, bounding box volume);
- Designed extensible Importer/Exporter hierarchy for future format support.
- Design Highlights:
- Strict MVC decoupling between View, Controller, and Model3D classes;
- Reusable components (e.g.,
Point3D
,Face3D
) adhering to SOLID principles; - Singleton-pattern controller with RAII memory management;
- Compliant with strict coding standards (comments ≥1/3, naming conventions, etc.).
- Outcome: Achieved grade A (top 10%), code selected as a reference for future students.