July 2007
Intermediate to advanced
448 pages
13h 39m
English
One step up from the triangle on the MeshGeometry3D complexity ladder is the rectangle. As with the triangle, I want to put the rectangle on the negative Z axis with the following vertices:

Figure 1-21. RectangleOnAxes.xaml
The Positions property of the MeshGeometry3D might be defined like so:
<MeshGeometry3D Positions="0 1 -4, 0 0 -4, 0 1 0, 0 0 0" ... />
The order of the points in this collection doesn't matter except when it comes time to define the TriangleIndices collection. A line drawn through the preceding rectangle shows how it can be divided into two triangles. The TriangleIndices collection consists of two triplets, ...
Read now
Unlock full access