zoukankan      html  css  js  c++  java
  • WPF : 3D 最简单的WPF 3D

    <Window x:Class="SimplestWpf3D.Window1"
        xmlns
    ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x
    ="http://schemas.microsoft.com/winfx/2006/xaml"
        Title
    ="Window1" Height="300" Width="300">
        
    <Grid>
            
    <Viewport3D>
                
    <!--Camera-->
                <Viewport3D.Camera>
                    
    <PerspectiveCamera />
                
    </Viewport3D.Camera>
                
                
    <!--Lights and Objects in the Children-->
                <Viewport3D.Children>                
                    
    <!--Light-->
                    <ModelVisual3D>
                        
    <ModelVisual3D.Content>
                            
    <DirectionalLight Color="White" Direction="0,1,-1"/>
                        
    </ModelVisual3D.Content>
                    
    </ModelVisual3D>
                    
                    
    <!--Object-->
                    <ModelVisual3D>
                        
    <ModelVisual3D.Content>
                            
    <GeometryModel3D>
                                
    <GeometryModel3D.Geometry>
                                    
    <MeshGeometry3D Positions="-1 0 -8, 1 0 -8, 0 1 -8"/>
                                
    </GeometryModel3D.Geometry>
                                
    <GeometryModel3D.Material>
                                    
    <DiffuseMaterial Brush="Red" />
                                
    </GeometryModel3D.Material>
                            
    </GeometryModel3D>
                        
    </ModelVisual3D.Content>
                    
    </ModelVisual3D>
                
    </Viewport3D.Children> 
            
    </Viewport3D>
        
    </Grid>
    </Window>
  • 相关阅读:
    Go语言实战_自己定义OrderedMap
    计算机图形学(二)输出图元_3_画线算法_2_DDA算法
    hibernate---java.lang.UnsupportedOperationException: The user must supply a JDBC connection
    OpenCV从入门到放弃(五):像素!
    ibatis 开发中的经验 (三)Struts+Spring+Ibatis 开发环境搭建
    HDU4911-Inversion
    hdu
    Maximum Likelihood Method最大似然法
    最小二乘法least square
    PASCAL VOC数据集The PASCAL Object Recognition Database Collection
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1179559.html
Copyright © 2011-2022 走看看