Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
Geometry3D Class

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
Geometry3D Class

Classes that derive from this abstract base class define 3D geometric shapes. The Geometry3D class of objects can be used for hit-testing and rendering 3D graphic data.

Namespace:  System.Windows.Media.Media3D
Assembly:  PresentationCore (in PresentationCore.dll)
Visual Basic (Declaration)
<LocalizabilityAttribute(LocalizationCategory.None, Readability := Readability.Unreadable)> _
Public MustInherit Class Geometry3D _
    Inherits Animatable
Visual Basic (Usage)
Dim instance As Geometry3D
C#
[LocalizabilityAttribute(LocalizationCategory.None, Readability = Readability.Unreadable)]
public abstract class Geometry3D : Animatable
Visual C++
[LocalizabilityAttribute(LocalizationCategory::None, Readability = Readability::Unreadable)]
public ref class Geometry3D abstract : public Animatable
JScript
public abstract class Geometry3D extends Animatable
XAML
This class is abstract; see Inheritance Hierarchy for derived non-abstract classes usable in XAML.

A Geometry3D by itself has no appearance. To render a Geometry3D, use a GeometryModel3D to combine the Geometry3D with a Material.

MeshGeometry3D is the concrete instance of a Geometry3D. To render a 3D shape, compose a GeometryModel3D by specifying a MeshGeometry3D and a Material.

The following example illustrates how a MeshGeometry3D is combined with a Material using a GeometryModel3D.

<GeometryModel3D>
  <GeometryModel3D.Geometry>
          <MeshGeometry3D 
              Positions="-1 -1 0  1 -1 0  -1 1 0  1 1 0"
              Normals="0 0 1  0 0 1  0 0 1  0 0 1"
              TextureCoordinates="0 1  1 1  0 0  1 0   "
              TriangleIndices="0 1 2  1 3 2" />
      </GeometryModel3D.Geometry>
      <GeometryModel3D.Material>
          <DiffuseMaterial>
              <DiffuseMaterial.Brush>
                  <SolidColorBrush Color="Cyan" Opacity="0.3"/>
              </DiffuseMaterial.Brush>
          </DiffuseMaterial>
      </GeometryModel3D.Material>
  <!-- Translate the plane. -->
      <GeometryModel3D.Transform>
          <TranslateTransform3D
            OffsetX="2" OffsetY="0" OffsetZ="-1"   >
          </TranslateTransform3D>
      </GeometryModel3D.Transform>
  </GeometryModel3D>

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker