다음을 통해 공유


Viewport2DVisual3D.Geometry 속성

정의

Viewport2DVisual3D의 3차원 기하 도형을 가져오거나 설정합니다.

public:
 property System::Windows::Media::Media3D::Geometry3D ^ Geometry { System::Windows::Media::Media3D::Geometry3D ^ get(); void set(System::Windows::Media::Media3D::Geometry3D ^ value); };
public System.Windows.Media.Media3D.Geometry3D Geometry { get; set; }
member this.Geometry : System.Windows.Media.Media3D.Geometry3D with get, set
Public Property Geometry As Geometry3D

속성 값

Geometry3D

Viewport2DVisual3D의 3차원 기하 도형입니다.

예제

다음 예제에서는 3 차원 개체에 단추를 2 차원 개체를 배치 하는 방법을 보여 줍니다.

<Viewport3D>
    <Viewport3D.Camera>
        <PerspectiveCamera Position="0, 0, 4"/>
    </Viewport3D.Camera>
    
    <!-- Button on 3D -->
    <Viewport2DVisual3D>
        <!-- Give the plane a slight rotation -->
        <Viewport2DVisual3D.Transform>
            <RotateTransform3D>
                <RotateTransform3D.Rotation>
                    <AxisAngleRotation3D Angle="40" Axis="0, 1, 0" />
                </RotateTransform3D.Rotation>
            </RotateTransform3D>
        </Viewport2DVisual3D.Transform>
        
        <!-- The Geometry, Material, and Visual for the Viewport2DVisual3D -->
        <Viewport2DVisual3D.Geometry>
            <MeshGeometry3D Positions="-1,1,0 -1,-1,0 1,-1,0 1,1,0"
                            TextureCoordinates="0,0 0,1 1,1 1,0" TriangleIndices="0 1 2 0 2 3"/>
        </Viewport2DVisual3D.Geometry>

        <Viewport2DVisual3D.Material>
            <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="White"/>
        </Viewport2DVisual3D.Material>                               
        
        <Button>Hello, 3D</Button>
    </Viewport2DVisual3D>
    
    <!-- Lights -->
    <ModelVisual3D>
        <ModelVisual3D.Content>
            <DirectionalLight Color="#FFFFFFFF" Direction="0,0,-1"/>
        </ModelVisual3D.Content>
    </ModelVisual3D>
</Viewport3D>

설명

Geometry .NET Framework 버전 3.5에서에서 도입 되었습니다.

적용 대상