Click or drag to resize
AB4D logo

DXViewportView Class

DXViewportView is a control that can shown the content of the WPF's Viewport3D with the DXEngine rendering engine.
Inheritance Hierarchy
SystemObject
  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            Ab3d.DirectX.ControlsDXView
              Ab3d.DirectX.ControlsDXViewportView

Namespace: Ab3d.DirectX.Controls
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
[ContentPropertyAttribute("Viewport3D")]
public class DXViewportView : DXView

The DXViewportView type exposes the following members.

Constructors
 NameDescription
Public methodDXViewportView Constructor
Public methodDXViewportView(Viewport3D) Constructor
Public methodDXViewportView(DXDevice, Viewport3D) Constructor
Public methodDXViewportView(DXScene, Viewport3D) Constructor
Public methodDXViewportView(DXViewportView, Viewport3D, Boolean) Constructor that creates a DXViewportView that shows the 3D scene defined in another DXViewportView.
Top
Properties
 NameDescription
Public propertyUseViewport3DCamera Gets or sets a Boolean that specifies if Camera from Viewport3D is used in Scene3D. If false, then the Scene3D.Camera need to be set to an object that is derived from ICamera.
Public propertyViewport3D Gets or sets a WPF's Viewport3D
Top
Methods
 NameDescription
Public methodGetAllHitObjects GetAllHitObjects method executes a hit testing on the SceneNodes in this DXScene and returns a list of DXRayHitTestResult objects sorted from the closest to the farthest object. When no object is hit, an empty list is returned.
Public methodGetClosestHitObject GetClosestHitObject method executes a hit testing on the SceneNodes in this DXScene and returns a DXRayHitTestResult object with the closest triangle hit by the specified ray. When no triangle is hit, null is returned.
Public methodGetHitPosition GetHitPosition method returns hit 3D position or null when no object was hit by the specified 2D position.
Top
Fields
 NameDescription
Public fieldStatic memberDXViewportViewProperty DXViewportViewProperty - used on Viewport3D to set a WeakReference to the DXViewportView that is used to render the Viewport3D.
Public fieldStatic memberRootSceneNodeName RootSceneNodeName defines the name of the SceneNode that is set to RootNode property.
Public fieldStatic memberUseTwoSidedMaterialsForSolidObjects Gets or sets a static Boolean that specifies if TwoSided material is used in case when Material and BackMaterial in GeometryModel3D are the same object and when they do not have any transparency. Two sided material has an advantage because the two sided material needs to be rendered only once. In case when TwoSided material is not used and Material and BackMaterial are the same then the object needs to be rendered twice - once for front material and once for back material. This value must be set before the WPF objects are converted into DXEngine SceneNodes. Default value is true. The value can be set to false to create the same number of RenderablePrimitive objects as in the version before v4.5. When rendering transparent objects the results can be different when using two sided material. See also UseTwoSidedMaterialsForTransparentObjects.
Public fieldStatic memberUseTwoSidedMaterialsForTransparentObjects Gets or sets a static Boolean that specifies if TwoSided material is used in case when Material and BackMaterial in GeometryModel3D are the same object and when they have transparency. Two sided material has an advantage because the two sided material needs to be rendered only once. In case when TwoSided material is not used and Material and BackMaterial are the same then the object needs to be rendered twice - once for front material and once for back material. This value must be set before the WPF objects are converted into DXEngine SceneNodes. Default value is true. The value can be set to false to create the same number of RenderablePrimitive objects as in the version before v4.5. When rendering transparent objects the results can be different when using two sided material. See also UseTwoSidedMaterialsForSolidObjects.
Public fieldStatic memberUseViewport3DCameraProperty UseViewport3DCameraProperty
Public fieldStatic memberViewport3DProperty Viewport3DProperty
Top
See Also