Click or drag to resize
AB4D logo

SceneNodeFactoryCreateFromVisual3D Method

Creates a SceneNode from the specified WPF's Visual3D.

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public static SceneNode CreateFromVisual3D(
	Visual3D visual3D,
	Effect defaultMaterialEffect,
	DXScene parentDXScene,
	Dictionary<Object, string> objectNames = null,
	string name = null
)

Parameters

visual3D  Visual3D
Visual3D to convert
defaultMaterialEffect  Effect
default Effect that is used by the created SceneNode
parentDXScene  DXScene
DXScene
objectNames  DictionaryObject, String  (Optional)
dictionary of object names
name  String  (Optional)
name of the created SceneNode

Return Value

SceneNode
SceneNode created from Visual3D
Remarks

CreateFromVisual3D method creates a SceneNode from the specified WPF's Visual3D.

The method first checks if the type of the visual3D is registered with RegisterVisual3DToSceneNodeCreator(Type, SceneNodeFactoryVisual3DToSceneNodeCreatorDelegate) method and in this case calls the registered delegate that can create the SceneNode. The order in which the registered types are checked is reversed from the order in which the types are registered. This way it is possible to first register base types and than specific types.

If SceneNode is not created with registered creator, than the CreateFromVisual3D method can created one of the following SceneNodes:

See Also