问题描述
我想在我正在编写的C#应用程序中使用Vector,尤其是Vector3。
I want to use Vectors in a C# application I'm writing, sepcifically a Vector3.
在不编写自己的类型的情况下获取Vector类型的最佳方法是什么?
What's the best way for me to get a Vector type without writing my own?
推荐答案
我在上找到的POC中使用了一个。这不是理想的方法,但可以解决我们的情况。但是,当时它还没有一种方法可以反映Vector3关于给定法线的信息,但是此后可能已经发生了变化。
I used one in a POC that I found on CodeProject. It's not ideal, but it worked for our situation. At the time, however, it did not have a method to reflect a Vector3 about a given normal, but that may have changed since then.
如果您不介意的话使用DirectX(出于某些原因请远离它),然后有一个也在该库中键入。
If you don't mind using DirectX (some stay away from it for whatever reason), then there is a Vector3 type in that library as well.
这篇关于如何在C#中获得向量类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!