Click or drag to resize
AB4D logo

WpfOptimizedModel3DGroupNode Class

WpfOptimizedModel3DGroupNode represents a SceneNode that is created from WPF's frozen Model3DGrup. The WpfOptimizedModel3DGroupNode optimizes the children so that they are rendered with as few draw calls as possible.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXSceneResource
        Ab3d.DirectXSceneNode
          Ab3d.DirectXObjectNode
            Ab3d.DirectX.ModelsBaseWpfObjectNode
              Ab3d.DirectX.ModelsWpfOptimizedModel3DGroupNode

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 6.1.8746.1045
Syntax
C#
public class WpfOptimizedModel3DGroupNode : BaseWpfObjectNode, 
	IRayHitTestedObject, IShadowCastingNode, IShadowReceivingNode

The WpfOptimizedModel3DGroupNode type exposes the following members.

Constructors
 NameDescription
Public methodWpfOptimizedModel3DGroupNode Initializes a new instance of the WpfOptimizedModel3DGroupNode class.
Top
Properties
 NameDescription
Public propertyAutomaticallyClearWpfObjectsAfterInitialization Gets or sets a Boolean that specifies if all WPF objects will be cleaned (calling ClearWpfObjects method) when the DirectX objects are initialized (created from WPF objects). This can free a lot of memory for GC. Default value is false.
Public propertyCombineModelsWithSameMaterial Gets or sets a boolean that specifies if models with the same materials (same diffuse color and specular properties) are combined and rendered with one Draw call. If false the mesh geometries for all models are still combined into one vertex and index buffer, but each model is rendered with its own material and with its own Draw call. This is useful when the material of the objects is changed.
Public propertyDXMultiMeshGeometry3D Gets the DXMultiMeshGeometry3D that is created to render front face materials.
Public propertyDXMultiMeshGeometry3DWithBackMaterials Gets the DXMultiMeshGeometry3D that is created to render back face materials.
Public propertyIsCastingShadow Gets or sets a Boolean that specifies if this SceneNode is casing shadow. This means that if IsCastingShadow is true, then 3D objects rendered with this SceneNode will create shadow; if false shadow will not be created. Default value is true.
Public propertyIsReceivingShadow Gets or sets a Boolean that specifies if this SceneNode can receive shadow - this means that the shadow is rendered on the object(s) rendered by this SceneNode. Default value is true.
Public propertyMaterialEffect Gets or sets the Effect that will render this WpfGeometryModel3DNode. If null, a standard effect will be used (effect set in EffectsManager as standard effect)
Public propertyModel3DGroup Gets the WPF's Model3DGroup that is used to initialize this WpfOptimizedModel3DGroupNode
Top
Methods
 NameDescription
Public methodClearWpfObjects Clears all references to WPF objects that were used to create this WpfOptimizedModel3DGroupNode. This can free a lot of memory for GC. See remarks for more info.
Public methodCollectRenderableObjects The task of the CollectRenderableObjects method is to create objects derived from RenderablePrimitiveBase and add them to the appropriate RenderingQueue. This method is called at the beginning of RenderScene method call but only when the scene was significantly changed (number of SceneNodes is changed, material is significantly changed, etc.)
(Overrides ObjectNodeCollectRenderableObjects)
Public methodGetClosestHitResult GetClosestHitResult method returns a DXRayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned.
Public methodGetDetailsText Returns string that tells details about this SceneNode
(Overrides BaseWpfObjectNodeGetDetailsText(Boolean, Boolean, Boolean, Boolean, Boolean))
Public methodGetNextHitResult GetNextHitResult method continues hit testing from the previously returned hit test and returns a DXRayHitTestResult with the next hit triangle (not necessary the next closest triangle) or null if no other triangle is hit. This method can be used to get all hit results.
Public methodUpdateBounds Updates the bounds of this SceneNode if the dirty flags indicates that the bounds could be changed of if the forceUpdate parameter is set to true
(Overrides SceneNodeUpdateBounds(Boolean))
Top
Fields
 NameDescription
Public fieldStatic memberDefaultCombineModelsWithSameMaterial Gets or sets a Boolean that specifies the default vale for CombineModelsWithSameMaterial. The default value is true.
Top
Extension Methods
 NameDescription
Public Extension MethodGetGeometryModel3D Returns a WPF's GeometryModel3D that was used to create the specified sceneNode. If the sceneNode does not define a GeometryModel3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModel3D Returns a WPF's Model3D that was used to create the specified sceneNode. If the sceneNode does not define a Model3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModelVisual3D Returns a WPF's ModelVisual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a ModelVisual3D is not found, then null is returned.
(Defined by Extensions)
Public Extension MethodGetVisual3D Returns a WPF's Visual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a Visual3D is not found, then null is returned.
(Defined by Extensions)
Top
See Also