Custom rendering
All the SceneNodes that are defined in the Ab3d.DXEngine.Wpf assembly are defined under Ab3d.DirectX.Models namespace - they can be also found in the chm help file and in online help - see

The reason that there is SetInstanceData is that this way you can set the instance data and also choose if you want to update the bounds - if bounds are updated, then the SetInstanceData method goes through all the instances and updates the bounding box of the SceneNode. This can take some time and therefore it is recommended to set the Bound by yourself (you probably know the bounding box in advance) and prevent calculating bound by the SetInstanceData.

What is more, there is also a SetInstanceBuffer method that can be called instead of SetInstanceData and where you can provide your own instance buffer (DirectX buffer with instance data).

In my opinion, it is nicer that for things that can take some time there are methods instead of setters. But in WPF setters are very common and therefore the InstancedMeshGeometryVisual3D also has a setter for InstanceData.

Specifying null to instance data will throw an exception in the current version. This is a known issue and is already fixed in the development version. To hide the instance objects, remove the InstancedMeshGeometry3DNode from the tree view.
Andrej Benedik
Oh ok, great, I didn't even see the chm file - I'll take a look.

And I apologize, I didn't see the entry under the wpf class docs, thanks!

Forum Jump:

Users browsing this thread:
1 Guest(s)