登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于碰撞检测的刚体物理引擎毕业论文

 2022-01-12 09:01  

论文总字数:21421字

摘 要

随着计算机的快速发展,人们对计算机游戏这一热门领域提出越来越高的要求,促进了计算机游戏技术的进步。计算机游戏是以计算机为平台,通过交互技术实现的一种应用,它对计算机的软硬件要求极为苛刻。计算机游戏的发展离不开几个重要的软件技术的进步:计算机显示技术、实时模拟技术、计算机网络技术。物理引擎作为模拟技术的核心功能部件,对计算机游戏的发展起到了至关重要的作用。物理引擎遵循或部分遵循现实世界的物理规律,根据人们的需求,让计算机能够近似地模拟真实世界的物理效果,使计算机中呈现的虚拟世界充满趣味性和真实性。

本课题使用物理引擎开发中常用的C 语言,在Visual Studio 2017集成开发环境上开发出一个具备物理碰撞回复特性的轻量化刚体物理引擎。该刚体物理引擎使用圆、矩形等几何图形来描述刚体对象的形状,并在刚体物理引擎中使用牛顿力学,根据碰撞检测算法(球球碰撞、盒盒碰撞等)和牛顿力学原理实现刚体对象之间的碰撞回复功能。本刚体物理引擎设计实现了刚体对象、碰撞检测、接触处理、显示交互四个功能模块,这些功能模块之间相互联系,构建了一个轻量化的刚体物理引擎。

关键词:计算机游戏 物理引擎 刚体 碰撞

Rigid Body Physics Engine Based on Collision Detection

Abstract

With the rapid development of computer, people put forward higher and higher requirements on computer game, which promotes the progress of computer game technology. Computer game is an application realized by interactive technology on the platform of computer. The development of computer games is inseparable from the progress of several important software technologies: computer display technology, real-time simulation technology, computer network technology. As the core functional component of simulation technology, physics engine plays a vital role in the development of computer games. The physics engine follows or partially follows the physical laws of the real world. According to people's needs, the computer can approximate the physical effects of the real world, making the virtual world presented by the computer full of interest and authenticity.

This project uses the C language commonly used in the development of physics engine to develop a lightweight rigid body physics engine with the characteristics of physical collision recovery on the Visual Studio 2017 integrated development environment. The rigid-body physics engine uses geometric shapes such as circles and rectangles to describe the shape of rigid-body objects, and uses Newton mechanics in the rigid-body physics engine to realize the collision recovery function between rigid-body objects according to collision detection algorithm (ball-ball collision, box-box collision, etc.) and Newton mechanics principle. This rigid body physics engine is designed to realize four functional modules, namely, rigid body object, collision detection, contact processing and display interaction. These functional modules are connected with each other, and a lightweight rigid body physics engine is built.

Keywords: Computer Game; Physics Engine; Rigid Body; Collision;

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 背景 1

1.2 研究现状 1

1.3 研究意义 2

第二章 系统开发技术和环境概述 3

2.1 相关技术简介 3

2.1.1 面向对象的开发技术 3

2.1.2 计算机图形渲染 3

2.1.3 碰撞检测技术 4

2.2 系统开发语言及环境 4

2.2.1 C 编程语言 4

2.2.2 OpenGL 5

2.2.3 Visual Studio 2017 5

第三章 系统功能分析和设计 6

3.1 需求分析 6

3.2 功能模块分析 6

3.3 系统架构设计 7

3.3.1 物理对象模块 8

3.3.2 碰撞检测模块 9

3.3.3 接触处理模块 10

3.3.4 交互显示模块 11

第四章 系统实现 13

4.1 物理对象模块 13

4.1.1 坐标系统 13

4.1.2 刚体对象基本属性 15

4.1.3 力学分析器 15

4.1.4 状态处理 17

4.1.5 力发生器 17

4.1.6 刚体约束 19

4.2 碰撞检测模块 20

4.2.1 碰撞数据 20

4.2.2 碰撞检测 20

4.3 接触处理模块 25

4.3.1 接触数据 25

4.3.2 接触处理 25

4.4 交互显示模块 29

4.4.1 用户输入 29

4.4.2 定时器 29

4.4.3 图形显示 29

总结与展望 31

参考文献 32

致谢 33

第一章 绪论

物理学一直是计算机游戏的热点,若缺乏物理引擎的支持,动作类游戏便会黯然失色。这一趋势也逐渐蔓延至其他风格的游戏中,包括战略游戏以及猜谜游戏[1]。面对计算机游戏行业的此等趋势,出现了多家专门提供高性能物理模拟器的供应商,大多数游戏大作均采用了商业级的通用物理引擎。

1.1 背景

当下电子游戏受到越来越多人的喜爱,其需求量日益增加,但是游戏对于软硬件的要求很苛刻,在过去的计算机上的表现不佳。但由于人们需求量的增加,迫使技术人员在相关领域加大研究力度,促进了相关硬件和软件的飞速发展,如今的计算机可以很好地运行各种游戏。

请支付后下载全文,论文总字数:21421字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图