c# - C# 中 3D 数学的好库?

标签 c# math 3d

<分区>

我正在编写一个工具,用于处理大量 3D 数据,执行诸如旋转对象、平移、缩放等所有有用的事情。有谁知道已经有一些这种常见的 3D 东西的好库?

目前我对可视化数据不感兴趣,主要对执行操作感兴趣。

我知道我现在需要的东西:

  • 2D/3D/4D 向量
    • (加法、减法、点积、叉积等...)
  • 使用矩阵旋转/平移/缩放
  • 四元数

我能够找到 Sharp3D图书馆,但它似乎可以做我想做的事,但很长时间没有更新了。有人用过这个吗?还有其他(更好的)建议吗?

最佳答案

Microsoft.Xna.Framework (发送此 XNA)可以完成这项工作。

The XNA Framework Math library has multiple basic geometric types that can be used to manipulate objects in 2D or 3D space. The primitive objects in this library represent the data required to represent a geometric object or an operation on that object. Each geometric type has a number of mathematical operations that are supported for the type.

Vector

The XNA Framework provides the Vector2, Vector3 and Vector4 classes for representing and manipulating vectors. A vector is typically used to represent a direction and magnitude. However, in the XNA framework it might also be used to store a coordinate or some other data type with the same storage requirements.

Each vector class has methods for performing standard vector operations such as:

  • Dot product
  • Cross product
  • Normalization
  • Transformation
  • Linear, Cubic, Catmull-Rom, or Hermite spline interpolation.

Matrices

The XNA Framework provides the Matrix class for transformation of geometry. The Matrix class uses a row major order to address matrices, which means that the row is specified before the column when describing an element of a two-dimensional matrix. The Matrix class provides methods for performing standard matrix operations such as calculating the determinate or inverse of a matrix, in addition to helper methods for creating scale, translation, and rotation matrices.

Quaternions

The XNA Framework provides the Quaternion structure to represent and calculate the efficient rotation about a vector around a specified angle.

关于c# - C# 中 3D 数学的好库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/607254/

相关文章:

c# - 如何使用 Split 和 TryParse?

c# - 在多个 Windows 应用商店应用程序之间共享 Windows 凭据 (Windows 10)

python - matplotlib-3D-plots 中没有 z 轴的指数形式

c++ - 如何为 GL_SELECT 缓冲区启用深度测试?

r - 在 R 和 gnuplot 中绘制大量 x、y、z 点进行 3D 绘图,并在每个时间步提取 bmp/gif/png 文件

c# - EntityFramework 和 aspnetdb

c# - 尝试创建一个 256 位 key 以存储在 web.config 中

linq - 为什么空集的总和为空?

java - 如何使用 sin/cos 创建修改后的椭圆路径

c++ - 为什么我的程序不近似 pi?