System.Windows.Media.Media3 ...


.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)
Syntax

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.
Remarks

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.

Examples

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

XAML
<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>
Inheritance Hierarchy

System..::.Object
  System.Windows.Threading..::.DispatcherObject
    System.Windows..::.DependencyObject
      System.Windows..::.Freezable
        System.Windows.Media.Animation..::.Animatable
          System.Windows.Media.Media3D..::.Geometry3D
            System.Windows.Media.Media3D..::.MeshGeometry3D
Thread Safety

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

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.
Version Information

.NET Framework

Supported in: 3.5, 3.0
See Also

Reference

Tags :


Page view tracker