Click or drag to resize
AB4D logo

SceneNodeFactoryRegisterVisual3DToSceneNodeCreator Method

RegisterVisual3DCreator registers a delegate that will be used to convert specified WPF Visual3D type into DXEngine's SceneNode. NOTE: The order in which the RegisterVisual3DCreator methods are called is important. Visual3D types that are registered later are checked first - this way it is possible to first register base types and than specific types.

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public static void RegisterVisual3DToSceneNodeCreator(
	Type visual3DType,
	SceneNodeFactoryVisual3DToSceneNodeCreatorDelegate creatorFunction
)

Parameters

visual3DType  Type
Type that is derived from Visual3D
creatorFunction  SceneNodeFactoryVisual3DToSceneNodeCreatorDelegate
Visual3DToSceneNodeCreatorDelegate to method that returns SceneNode
Remarks

RegisterVisual3DCreator registers a delegate that will be used to convert specified WPF Visual3D type into DXEngine's SceneNode.

NOTE: The order in which the RegisterVisual3DCreator methods are called is important. Visual3D types that are registered later are checked first - this way it is possible to first register base types and than specific types.

If RegisterVisual3DToSceneNodeCreator is called again with the same visual3DType, then the previous delegate is overwritten with the new creatorFunction.

To unregister a type use the UnRegisterVisual3DToSceneNodeCreator(Type) or UnregisterAllVisual3DToSceneNodeCreators methods.

Method is thread safe and can be called from any thread.

See Also