GeometryModel3D

The shape of visible objects in a 3D scene is defined by their geometry. In WPF, you specify 3D geometry by using Geometry3D objects. However, a Geometry3D by itself defines a 3D surface with no appearance. In order to see the 3D surface, you need to combine it with a Material. A GeometryModel3D is a Model3D that combines both, using the Geometry and Material properties.

The following is an example of a GeometryModel3D that renders a square (described as a MeshGeometry3D) using a blue DiffuseMaterial:

<GeometryModel3D><GeometryModel3D.Material>  <DiffuseMaterial Brush="Blue"/></GeometryModel3D.Material><GeometryModel3D.Geometry>  <MeshGeometry3D Positions="-1,1,0 -1,-1,0 1,-1,0 1,1,0"                   ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.