starting from a basic HelixToolkit example, I am able to render a mesh. In my .xaml file:
<HelixToolkit:HelixViewport3D Name ="viewPort" ZoomExtentsWhenLoaded="True">
<HelixToolkit:SunLight/>
<!--The content of this visual is defined in MainViewModel.cs-->
<ModelVisual3D Content="{Binding Model}"/>
And in my .cs file:
Model3DGroup modelGroup = new Model3DGroup();
// [... add stuff to modelGroup as children ]
this.Model = modelGroup;
Now, I try to modify my rendered objects when a button is clicked. I tried to implement it through a callback function by updating the model.
public void testUpdate(){
Model3DGroup newModelGroup = new Model3DGroup();
// [... add stuff to newModelGroup as children ]
this.Model = newModelGroup;
}
This doesn't work: the shown objects are not those added to newModelGroup. How can I do that?