possible 3D LookDirection bug
the scene has a cube at the origin. the camera is looking down on it from LookDirection="0,.0001,-1" ... and that works. but if i change it to LookDirection="0,0,-1" ... then the cube cannot be seen. i'm assuming a DivideByZero bug happens somewhere during processing?
Just copy/paste the XAML below into a file and open in IE.
Thanks, casey
<CanvasClipToBounds="true"Width="400"Height="300"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"xmlns:c="http://schemas.openxmlformats.org/markup-compatibility/2006"c:Ignorable="d">
<Viewport3DClipToBounds="true"Width="400"Height="400">
<Viewport3D.Camera>
<!--WORKS can see the cube, if LookDirection is not quite zero-->
<PerspectiveCameraFarPlaneDistance="20"LookDirection="0,.0001,-1"UpDirection="0,0,1"NearPlaneDistance="1"Position="0,0,10"FieldOfView="45" />
<!--FAILS cannot see the cube-->
<!--PerspectiveCamera FarPlaneDistance="20" LookDirection="0,0,-1" UpDirection="0,0,1" NearPlaneDistance="1" Position="0,0,10" FieldOfView="45" /-->
</Viewport3D.Camera>
<ModelVisual3D>
<ModelVisual3D.Content>
<Model3DGroupx:Name="Scene">
<Model3DGroup.Transform>
<Transform3DGroup>
<TranslateTransform3DOffsetX="0"OffsetY="0"OffsetZ="0"/>
<ScaleTransform3DScaleX="1"ScaleY="1"ScaleZ="1"/>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3DAngle="0"Axis="0 1 0"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
<RotateTransform3D>
<RotateTransform3D.Rotation>
<AxisAngleRotation3DAngle="0"Axis="1 0 0"/>
</RotateTransform3D.Rotation>
</RotateTransform3D>
<TranslateTransform3DOffsetX="0"OffsetY="0"OffsetZ="0"/>
</Transform3DGroup>
</Model3DGroup.Transform>
<AmbientLightColor="#646464" />
<Model3DGroupxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Model3DGroup.Children>
<GeometryModel3D>
<!--left handed world-->
<GeometryModel3D.BackMaterial>
<DiffuseMaterial>
<DiffuseMaterial.Brush>
<SolidColorBrushColor="Red"Opacity="1.0" />
</DiffuseMaterial.Brush>
</DiffuseMaterial>
</GeometryModel3D.BackMaterial>
<GeometryModel3D.Geometry>
<MeshGeometry3Dx:Key="myCube"TriangleIndices="0 2 1 0 3 2 1 5 4 1 2 5 0 6 7 0 7 3 6 4 5 6 7 5 3 5 2 3 7 5 0 1 4 0 4 6"
TextureCoordinates="1,0 0,0 0,1 1,1 0,0 0,1 1,0 1,1"
Normals="0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1 0,0,1"
Positions="1,1,0 0,1,0 0,0,0 1,0,0 0,1,-1 0,0,-1 1,1,-1 1,0,-1" />
</GeometryModel3D.Geometry>
</GeometryModel3D>
</Model3DGroup.Children>
</Model3DGroup>
</Model3DGroup>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D>
</Canvas>

