Csharp/C#教程:在WPF应用程序中旋转HelixViewport3D中的对象分享


在WPF应用程序中旋转HelixViewport3D中的对象

我正在尝试使用helixtoolkit在WPF应用程序中显示一个3d对象,并根据沿x,y,z轴的3个变量(用户输入)旋转它。 但我没有在螺旋工具包中找到一个旋转3d对象的函数。

C#代码

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.Windows.Media.Media3D; using HelixToolkit.Wpf; namespace HelixTrial { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); ModelImporter importer = new ModelImporter(); Model3D model = importer.Load("D:\Crate1.obj"); Models.Content = model; // need to apply rotation to the model using three x,y,z variables } } } 

XAML代码

         

您无法在工具包中找到它,因为它是标准的WPF函数 。 所以在你的例子中它看起来有点像这样:

上述就是C#学习教程:在WPF应用程序中旋转HelixViewport3D中的对象分享的全部内容,如果对大家有所用处且需要了解更多关于C#学习教程,希望大家多多关注—计算机技术网(www.ctvol.com)!

                      

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/cdevelopment/943432.html

(0)
上一篇 2021年11月14日
下一篇 2021年11月14日

精彩推荐