项目作者: walbourn

项目描述 :
A SDKMESH/CMO model viewer using DirectX Tool Kit for DirectX 11
高级语言: C++
项目地址: git://github.com/walbourn/directxtkmodelviewer.git
创建时间: 2015-11-12T22:58:01Z
项目社区:https://github.com/walbourn/directxtkmodelviewer

开源协议:MIT License

下载


DirectX Logo

Model Viewer for DirectX Tool Kit for DirectX 11

Copyright (c) Microsoft Corporation.

June 4, 2024

The DirectX Tool Kit Model Viewer is an interactive test application for validating .SDKMESH, .VBO, and .CMO files rendered using the DirectX Tool Kit.

This code is designed to build with Visual Studio VS 2019 (16.11) or later.

Notices

All content and source code for this package are subject to the terms of the MIT License.

For the latest version of the Model Viewer for DirectX Tool Kit, bug reports and feature requests,
please visit the project site on GitHub.

Build Instructions

Run VS 2019

Open Project/Solution… DirectXTKModelViewer_Desktop_2019.sln

Ensure DirectXTKModelViewer_Desktop_2019 is the “StartUp Project”

Build and Run (F5)

PC

If a Xbox 360 or Xbox One gamepad controller is plugged into the PC it can be used to control the viewer (see below for details). If you press the “View” button, an Open File
Dialog is used to select the model (.SDKMESH, .CMO, or .VBO) to load.

If no controller is plugged in, you can use keyboard & mouse controls. If you press the “O” key, an Open File Dialog is used to select the model (.SDKMESH, .CMO, or .VBO) to load.

Mouse

  • Press and hold LEFT mouse button to rotate view (SHIFT+LEFT button rotates object instead)

  • Press and hold RIGHT mouse button to translate view in XY (SHIFT+RIGHT translates in Z)

  • Scroll wheel controls zoom (i.e. distance between camera and focus point)

Keyboard

  1. W/S and PageUp/PageDown translates in Z
  2. A/D and Left/Right translates in X
  3. Up/Down translates in Y
  4. Q/E rotate left/right
  5. B toggles culling mode
  6. C cycles background color
  7. G toggles the grid display
  8. H toggles HUD display
  9. J toggles the cross display
  10. R toggles wireframe
  11. L toggles lighting vs. unlit (BasicEffect only)
  12. T cycles tone-mapping operator
  13. N cycles bone rendering mode (World vs. Rigid/Skinnned)
  14. [/] scales the FOV
  15. +/- scales the grid size
  16. O loads model
  17. Enter/Backspace cycles Image-Based Lighting for PBR models
  18. Home key resets camera to default position
  19. End key resets model to default rotation

GamePad

  1. A - Change modes Orbit vs. FPS
  2. B - Toggles wireframe/culling/lighting mode
  3. X - Cycles grid, viewpoint cross, and HUD display
  4. Y - Cycle background color
  5. Menu - Cycle tone-mapping operator
  6. DPAD
  7. U - Translate Up
  8. D - Translate Down
  9. R - Translate Right
  10. L - Translate Left
  11. Right Trigger - Increment FOV
  12. Left Trigger - Decrement FOV
  13. Right Bumper - Increment translate sensitivity
  14. Left Bumper - Decrement translate sensitivity
  15. Left Thumbstick button - Frame scene extents
  16. Orbit
  17. Right Thumbstick
  18. R - Orbit Right
  19. L - Orbit Left
  20. U - Orbit Up
  21. D - Orbit Down
  22. Click - Reset View to Default
  23. Left Thumbstick
  24. R - Rotate (Roll) Right
  25. L - Rotate (Roll) Left
  26. U - Move towards view point
  27. D - Move away from view point
  28. Click - cycles bone rendering mode
  29. FPS
  30. Right Thumbstick
  31. R - Rotate Right
  32. L - Rotate Left
  33. U - Rotate Up
  34. D - Rotate Down
  35. Left Thumbstick
  36. R - Translate Right
  37. L - Translate Left
  38. U - Translate Forward
  39. D - Translate Back
  40. Click - cycles bone rendering mode

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.