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>
  • 相关阅读:
    很好用的DBHelper类
    .net连接SAP的几种方式
    使用API管理平台的优势
    ASP.NET 2.0中的登陆控件简介
    asp.net 1.1/ 2.0 中快速实现单点登陆
    ASP.NET 2.0 成员资格和角色管理授权
    SqlDataSource 调用带参数的存储过程
    Asp.net中基于Forms验证的角色验证授权
    解释:ASP.NET 2.0 中的窗体身份验证
    SQL JOIN 的用法
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1179559.html
Copyright © 2011-2022 走看看