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>
  • 相关阅读:
    iBatis查询时报“列名无效”无列名的错误原因及解决方法
    【转】Spring结合Quartz实现多任务定时调用
    关于jar中读取包内和包外文件
    【摘自百度文库】数据库水平切分的实现原理解析
    web.xml 中的listener、 filter、servlet 加载顺序及其详解(转载)
    EL表达式
    【转】使用XFire+Spring构建Web Service
    慎用href="javascript:void(0)"
    POI导出EXCEL【摘自:oschina.net】
    【转】IBM websphere6.1 不支持泛型、intInteger类型的自动装箱和拆箱问题
  • 原文地址:https://www.cnblogs.com/mrfangzheng/p/1179559.html
Copyright © 2011-2022 走看看