![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | SpotLight in WPFcann't form a circle light effect ,Why? Hi! Guys, I have a problem. When I use a spotlight in the 3-D scene to light a side plane of a cube ,the result is not a circle light effect. <Viewport3D ClipToBounds="True" Width="150" Height="150" Canvas.Left="0" Canvas.Top="10"> <!-- Defines the camera used to view the 3D object. --> <Viewport3D.Camera> <PerspectiveCamera Position="0,0,2" LookDirection="0,0,-1" FieldOfView="60" /> </Viewport3D.Camera> <!-- The ModelVisual3D children contain the 3D models --> <Viewport3D.Children> <!-- A SpotLight is used to light the scene. The InnerConeAngle and OuterConeAngle are used to control the size of the light cone created by the SpotLight. The Direction and Position properties determine where the SpotLight is pointing in the scene. In this example, the Position of the SpotLight is set so that the SpotLight is only illuminating the upper right-hand corner of the 3D object. --> <ModelVisual3D> <ModelVisual3D.Content> <SpotLight x:Name="mySpotLight" InnerConeAngle="15.0" OuterConeAngle="22.0" Color="#FFFFFF" Direction="0,0,-1" Position="0,0,5" Range="30"/> </ModelVisual3D.Content> </ModelVisual3D> <ModelVisual3D> <ModelVisual3D.Content> <GeometryModel3D> <!-- The geometry specifes the shape of the 3D plane. In this sample, a flat sheet is created. --> <GeometryModel3D.Geometry> <MeshGeometry3D TriangleIndices="0,1,2 3,4,5 " Normals="0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 " TextureCoordinates="0,0 1,0 1,1 1,1 0,1 0,0 " Positions="-0.5,-0.5,0.5 0.5,-0.5,0.5 0.5,0.5,0.5 0.5,0.5,0.5 -0.5,0.5,0.5 -0.5,-0.5,0.5 " /> </GeometryModel3D.Geometry> <GeometryModel3D.Material> <MaterialGroup> <DiffuseMaterial> <DiffuseMaterial.Brush> <SolidColorBrush Color="Blue" /> </DiffuseMaterial.Brush> </DiffuseMaterial> </MaterialGroup> </GeometryModel3D.Material> </GeometryModel3D> </ModelVisual3D.Content> </ModelVisual3D> </Viewport3D.Children> </Viewport3D> |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Onlight Spotlight in Vista MC | Vista General | |||
| Intel Viiv entertainment pass Online Spotlight Not Showing up | Vista General | |||