![glm](/doc/manual/logo-mini.png)
[OpenGL Mathematics](http://glm.g-truc.net/) (*GLM*) is a header only C++ mathematics library for graphics software based on the [OpenGL Shading Language (GLSL) specifications](https://www.opengl.org/registry/doc/GLSLangSpec.4.50.diff.pdf).
*GLM* provides classes and functions designed and implemented with the same naming conventions and functionality than *GLSL* so that anyone who knows *GLSL*, can use *GLM* as well in C++.
This project isn't limited to *GLSL* features. An extension system, based on the *GLSL* extension conventions, provides extended capabilities: matrix transformations, quaternions, data packing, random numbers, noise, etc...
This library works perfectly with *[OpenGL](https://www.opengl.org)* but it also ensures interoperability with other third party libraries and SDK. It is a good candidate for software rendering (raytracing / rasterisation), image processing, physics simulations and any development context that requires a simple and convenient mathematics library.
*GLM* is written in C++98 but can take advantage of C++11 when supported by the compiler. It is a platform independent library with no dependence and it officially supports the following compilers:
- [*GCC*](http://gcc.gnu.org/) 4.7 and higher
- [*Intel C++ Compose*](https://software.intel.com/en-us/intel-compilers) XE 2013 and higher
- [*Clang*](http://llvm.org/) 3.4 and higher
- [*Apple Clang 6.0*](https://developer.apple.com/library/mac/documentation/CompilerTools/Conceptual/LLVMCompilerOverview/index.html) and higher
- [*Visual C++*](http://www.visualstudio.com/) 2013 and higher
- [*CUDA*](https://developer.nvidia.com/about-cuda) 9.0 and higher (experimental)
- [*SYCL*](https://www.khronos.org/sycl/) (experimental: only [ComputeCpp](https://codeplay.com/products/computesuite/computecpp) implementation has been tested).
- Any C++11 compiler
For more information about *GLM*, please have a look at the [manual](manual.md) and the [API reference documentation](http://glm.g-truc.net/0.9.8/api/index.html).
The source code and the documentation are licensed under either the [Happy Bunny License (Modified MIT) or the MIT License](manual.md#section0).
Thanks for contributing to the project by [submitting pull requests](https://github.com/g-truc/glm/pulls).
```cpp
#include <glm/vec3.hpp> // glm::vec3
#include <glm/vec4.hpp> // glm::vec4
#include <glm/mat4x4.hpp> // glm::mat4
#include <glm/ext/matrix_transform.hpp> // glm::translate, glm::rotate, glm::scale
#include <glm/ext/matrix_clip_space.hpp> // glm::perspective
#include <glm/ext/scalar_constants.hpp> // glm::pi
glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
{
glm::mat4 Projection = glm::perspective(glm::pi<float>() * 0.25f, 4.0f / 3.0f, 0.1f, 100.f);
glm::mat4 View = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, 0.0f, -Translate));
View = glm::rotate(View, Rotate.y, glm::vec3(-1.0f, 0.0f, 0.0f));
View = glm::rotate(View, Rotate.x, glm::vec3(0.0f, 1.0f, 0.0f));
glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
return Projection * View * Model;
}
```
## [Lastest release](https://github.com/g-truc/glm/releases/latest)
## Project Health
| Service | System | Compiler | Status |
| ------- | ------ | -------- | ------ |
| [Travis CI](https://travis-ci.org/g-truc/glm)| MacOSX, Linux 64 bits | Clang 3.6, Clang 5.0, GCC 4.9, GCC 7.3 | [![Travis CI](https://travis-ci.org/g-truc/glm.svg?branch=master)](https://travis-ci.org/g-truc/glm)
| [AppVeyor](https://ci.appveyor.com/project/Groovounet/glm)| Windows 32 and 64 | Visual Studio 2013, Visual Studio 2015, Visual Studio 2017 | [![AppVeyor](https://ci.appveyor.com/api/projects/status/32r7s2skrgm9ubva?svg=true)](https://ci.appveyor.com/project/Groovounet/glm)
## Release notes
### [GLM 0.9.9.9](https://github.com/g-truc/glm/releases/tag/0.9.9.9) - 2020-XX-XX
#### Features:
- Added *GLM_EXT_scalar_reciprocal* with tests
- Added *GLM_EXT_vector_reciprocal* with tests
- Added `glm::iround` and `glm::uround` to *GLM_EXT_scalar_common* and *GLM_EXT_vector_common*
- Added *GLM_EXT_matrix_integer* with tests
#### Improvements:
- Added `constexpr` qualifier for `cross` product #1040
- Added `constexpr` qualifier for `dot` product #1040
#### Fixes:
- Fixed incorrect assertion for `glm::min` and `glm::max` #1009
- Fixed quaternion orientation in `glm::decompose` #1012
- Fixed singularity in quaternion to euler angle roll conversion #1019
- Fixed `quat` `glm::pow` handling of small magnitude quaternions #1022
- Fixed `glm::fastNormalize` build error #1033
- Fixed `glm::isMultiple` build error #1034
- Fixed `glm::adjugate` calculation #1035
- Fixed `glm::angle` discards the sign of result for angles in range (2*pi-1, 2*pi) #1038
- Removed ban on using `glm::string_cast` with *CUDA* host code #1041
### [GLM 0.9.9.8](https://github.com/g-truc/glm/releases/tag/0.9.9.8) - 2020-04-13
#### Features:
- Added *GLM_EXT_vector_intX* and *GLM_EXT_vector_uintX* extensions
- Added *GLM_EXT_matrix_intX* and *GLM_EXT_matrix_uintX* extensions
#### Improvements:
- Added `glm::clamp`, `glm::repeat`, `glm::mirrorClamp` and `glm::mirrorRepeat` function to `GLM_EXT_scalar_commond` and `GLM_EXT_vector_commond` extensions with tests
#### Fixes:
- Fixed unnecessary warnings from `matrix_projection.inl` #995
- Fixed quaternion `glm::slerp` overload which interpolates with extra spins #996
- Fixed for `glm::length` using arch64 #992
- Fixed singularity check for `glm::quatLookAt` #770
### [GLM 0.9.9.7](https://github.com/g-truc/glm/releases/tag/0.9.9.7) - 2020-01-05
#### Improvements:
- Improved *Neon* support with more functions optimized #950
- Added *CMake* *GLM* interface #963
- Added `glm::fma` implementation based on `std::fma` #969
- Added missing quat constexpr #955
- Added `GLM_FORCE_QUAT_DATA_WXYZ` to store quat data as w,x,y,z instead of x,y,z,w #983
#### Fixes:
- Fixed equal *ULP* variation when using negative sign #965
- Fixed for intersection ray/plane and added related tests #953
- Fixed ARM 64bit detection #949
- Fixed *GLM_EXT_matrix_clip_space* warnings #980
- Fixed Wimplicit-int-float-conversion warnings with clang 10+ #986
- Fixed *GLM_EXT_matrix_clip_space* `perspectiveFov`
### [GLM 0.9.9.6](https://github.com/g-truc/glm/releases/tag/0.9.9.6) - 2019-09-08
#### Features:
- Added *Neon* support #945
- Added *SYCL* support #914
- Added *GLM_EXT_scalar_integer* extension with power of two and multiple scalar functions
- Added *GLM_EXT_vector_integer* extension with power of two and multiple vector functions
#### Improvements:
- Added *Visual C++ 2019* detection
- Added *Visual C++ 2017* 15.8 and 15.9 detection
- Added missing genType check for `glm::bitCount` and `glm::bitfieldReverse` #893
#### Fixes:
- Fixed for g++6 where -std=c++1z sets __cplusplus to 201500 instead of 201402 #921
- Fixed hash hashes qua instead of tquat #919
- Fixed `.natvis` as structs renamed #915
- Fixed `glm::ldexp` and `glm::frexp` declaration #895
- Fixed missing const to quaternion conversion operators #890
- Fixed *GLM_EXT_scalar_ulp* and *GLM_EXT_vector_ulp* API coding style
- Fixed quaternion componant order: `w, {x, y, z}` #916
- Fixed `GLM_HAS_CXX11_STL` broken on Clang with Linux #926
- Fixed *Clang* or *GCC* build due to wrong `GLM_HAS_IF_CONSTEXPR` definition #907
- Fixed *CUDA* 9 build #910
#### Deprecation:
- Removed CMake install and uninstall scripts
### [GLM 0.9.9.5](https://github.com/g-truc/glm/releases/tag/0.9.9.5) - 2019-04-01
#### Fixes:
- Fixed build errors when defining `GLM_ENABLE_EXPERIMENTAL` #884 #883
- Fixed `if constexpr` warning #887
- Fixed missing declarations for `glm::frexp` and `glm::ldexp` #886
### [GLM 0.9.9.4](https://github.com/g-truc/glm/releases/tag/0.9.9.4) - 2019-03-19
#### Features:
- Added `glm::mix` implementation for matrices in *GLM_EXT_matrix_common/ #842
- Added *CMake* `BUILD_SHARED_LIBS` and `BUILD_STATIC_LIBS` build options #871
#### Improvements:
- Added GLM_FORCE_INTRINSICS to ena
没有合适的资源?快使用搜索试试~ 我知道了~
北京大学图形学课程小作业代码-鼠标交互,键盘交互+源代码+文档说明
共1670个文件
h:342个
hpp:285个
inl:152个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 27 浏览量
2024-01-05
20:14:54
上传
评论
收藏 29.95MB ZIP 举报
温馨提示
#实现功能: 鼠标交互 移动鼠标,将会转动视角 滚动鼠标滚轮,将会进行缩放(没有鼠标,不知是否可行) 按动鼠标左右键,将会进行缩放(已检验) 键盘交互 W S A D 向上/向下/向左/向右平移模型 G 将手的动作调整为抓握 V将手的动作调整为挥手 O将手的动作调整为OK B将手的动作调整为点赞 U将手的动作调整为手枪 1 2 3 4 5 6 7 8 9将手的动作调整为对应的数字 space 暂停手的动作。再次按下时将会继续从暂停的地方继续进行手的动作。 - - 小白不懂运行,下载完可以私聊问,可远程教学 该资源内项目源码是个人的课程设计,代码都测试ok,都是运行成功后才上传资源,答辩评审平均分达到96分,放心下载使用! ## 项目备注 1、该资源内项目代码都经过测试运行成功,功能ok的情况下才上传的,请放心下载使用! 2、本项目适合计算机相关专业(如计科、人工智能、通信工程、自动化、电子信息等)的在校学生、老师或者企业员工下载学习,也适合小白学习进阶,当然也可作为毕设项目、课程设计、作业、项目初期立项演示等。 3、如果基础还行,也可在此代码基础上进行修改,以实现其他功能,也可用于毕设
资源推荐
资源详情
资源评论
收起资源包目录
北京大学图形学课程小作业代码-鼠标交互,键盘交互+源代码+文档说明 (1670个子文件)
miniunzip.1 2KB
minizip.1 1KB
README.686 2KB
libassimpd.a 42.19MB
libGLEWd.a 1.46MB
libglfw3d.a 799KB
libstbd.a 344KB
libIrrXMLd.a 249KB
configure.ac 3KB
configure.ac 787B
zlib.adb 20KB
test.adb 13KB
zlib-streams.adb 6KB
mtest.adb 4KB
read.adb 4KB
buffer_demo.adb 4KB
zlib-thin.adb 3KB
zlib-thin.ads 15KB
zlib.ads 13KB
zlib-streams.ads 4KB
Makefile.am 10KB
Makefile.am 818B
asan-wrapper 2KB
gvmat64.asm 16KB
match686.asm 15KB
inffas32.asm 15KB
inffasx64.asm 10KB
AUTHORS 147B
BUILDBINARIES_EXAMPLE.bat 959B
bld_ml32.bat 90B
bld_ml64.bat 84B
CMakeDetermineCompilerABI_C.bin 16KB
CMakeDetermineCompilerABI_CXX.bin 16KB
Makefile.bor 3KB
DotZLib.build 1KB
glew.c 1.3MB
glad_gl.c 107KB
x11_window.c 98KB
deflate.c 77KB
unzip.c 69KB
win32_window.c 68KB
zip.c 64KB
wl_window.c 57KB
inflate.c 54KB
unzip.c 48KB
wl_init.c 45KB
trees.c 43KB
x11_init.c 42KB
inffas86.c 40KB
puff.c 37KB
input.c 37KB
glad_vulkan.c 36KB
window.c 32KB
wgl_context.c 26KB
win32_joystick.c 26KB
context.c 25KB
egl_context.c 24KB
zip.c 24KB
win32_init.c 23KB
xkb_unicode.c 22KB
infback.c 22KB
glx_context.c 22KB
infback9.c 21KB
CMakeCCompilerId.c 20KB
gzread.c 20KB
x11_monitor.c 19KB
gzwrite.c 19KB
blast.c 18KB
miniunz.c 17KB
gzlib.c 16KB
untgz.c 16KB
win32_monitor.c 16KB
minizip.c 15KB
monitor.c 15KB
iowin32.c 14KB
crc32.c 14KB
inftree9.c 13KB
tinycthread.c 13KB
inftrees.c 13KB
inffast.c 13KB
linux_joystick.c 12KB
test.c 12KB
vulkan.c 11KB
osmesa_context.c 11KB
init.c 9KB
ioapi.c 8KB
mztools.c 8KB
getopt.c 8KB
null_window.c 8KB
inffas8664.c 7KB
testzlib.c 7KB
zutil.c 7KB
wl_monitor.c 7KB
adler32.c 5KB
pufftest.c 5KB
ioapi.c 4KB
posix_thread.c 3KB
win32_thread.c 3KB
test_miniz.c 3KB
uncompr.c 3KB
共 1670 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
机智的程序员zero
- 粉丝: 1928
- 资源: 4200
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 智能主板原理图,文件后缀是SCHDOC
- 计算机网络期末复习是一个综合性的过程,需要对网络的基础理论、协议、体系结构以及应用等有深入的了解 以下是一些建议的复习内容和方法
- Playwright+Python自动化测试
- 现成版动图爱心exe文件直接用window打开即可展现
- 零基础DSP实战TMS320F28035:第十节,DSP之CLA内核应用实战.zip
- 789654645645
- 当你说到HTML(HyperText Markup Language),它是用于创建网页内容的标准标记语言 HTML通过标签(t
- 基于zigbee和stm32的智能家居系统,上位机使用Qt编写,实现了基本的监控 主要包括监控室内温度、湿度、烟雾浓度等
- 以下是一个简单的HTML5和CSS3代码示例,用于在网页上展示一个爱心形状,并搭配一些文本作为表白使用 这个代码不依赖于Java
- 079版ijl15.dll 源码.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功