gpt4 book ai didi

wpf - 什么是网格几何?

转载 作者:行者123 更新时间:2023-12-03 07:49:19 24 4
gpt4 key购买 nike

WPF 中的网格几何体是什么?

<MeshGeometry3D Positions="0,0,0 10,0,0 10,10,0 0,10,0 0,0,10 10,0,10 10,10,10 0,10,10"
TriangleIndices="0 1 3 1 2 3 0 4 3 4 7 3 4 6 7 4 5 6 0 4 1 1 4 5 1 2 6 6 5 1 2 3 7 7 6 2" />

这是我的代码,PositionsTriangleIndices 中的数字含义是什么?

最佳答案

MeshGeometry3D allows the developer to specify position, normal, and texture coordinate information. The Positions property is required.

Normals are assumed to be associated with the front faces of a mesh primitive. The winding order (the order in which the Positions that make up each triangle of the mesh are specified) determines whether a given face is front-facing or back-facing. Front-facing triangles are wound in counter-clockwise order; back-facing triangles are wound in clockwise order.

MSDN

Positions:

The points specifed by this property represent the vertices of the triangles that make up a 3-D mesh.

The winding order (the order in which the Positions that make up each triangle of the mesh are specified) determines whether a given face is front-facing or back-facing. Front-facing triangles are wound in counter-clockwise order; back-facing triangles are wound in clockwise order.

TriangleIndices:

For a triangle in a given 3-D mesh, the order in which the triangle's vertex positions are specified determines whether the triangle face is a front or back face.

The Windows Presentation Foundation 3-D implementation uses a counter-clockwise winding order; that is, the points that determine a front-facing mesh triangle's positions should be specified in counterclockwise order, as viewed from the front of the mesh.

Setting the TriangleIndices property is optional. If the indices are not specified, triangles are drawn in a non-indexed fashion. Every set of three positions becomes a triangle.

关于wpf - 什么是网格几何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5650352/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com