1
我開始嘗試使用WPF 3D渲染,並且我面臨的第一個問題之一是如何禁用臉部剔除。 我知道如何在DirectX和OpenGL中做到這一點,但我找不到在WPF中這樣做的方法。 這是我的ViewPort標記。該模型在運行時產生的,它是一個GeometryModel3D在WPF中禁用臉部剔除
<Viewport3D x:Name="viewport" DockPanel.Dock="Right" Margin="0" >
<Viewport3D.Camera>
<PerspectiveCamera x:Name="camera" FarPlaneDistance="50" LookDirection="0,0,-10"
UpDirection="0,1,0" NearPlaneDistance="0" Position="0,0,5"
FieldOfView="45" />
</Viewport3D.Camera>
<ModelVisual3D x:Name="model">
<ModelVisual3D.Content>
<Model3DGroup x:Name="group">
<AmbientLight Color="DarkGray" />
<DirectionalLight Color="White" Direction="-5,-5,-7" />
</Model3DGroup>
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D>
非常感謝你給我任何建議裏面MeshGeometry3D。