Updating visuals created from MeshGeometry3D
#1
I'm currently working with the Trial version to ensure we can smoothly migrate from our current WPF/Viewport3D based solution to using the AB4D library.

I just need a point in the right direction on how to deal with dynamically changing 3D geometry. For example, we have a sculpting tool, starting with a MeshGeometry3D, the Positions will be morphed to new positions.

For example, we create a 'ModelVisual3D' from a 'GeometryModel3D' made from the 'MeshGeometry3D'. This is added to the Viewport3D.

We then just modify the points in the MeshGeometry3D.Positions collection - even without disconnecting the Point3DCollection from the MeshGeometry3D before updating, the result is pretty good.

However using this technique within a DXViewportView, the refresh rate is poor.

Could you please advise a better path for me to take to handle this scenario.

Thank you in advance.

I wasn't actually disconnecting the Point3DCollection correctly from the MeshGeometry3D before update:

For example, this now works great...
Code:
Point3DCollection pts = myMesh.
myMesh.Positions = null;    // I had this after the loop...doh!!!!
for (int i = 0; i < pts.Count; i++)
{
     pts[i] = pts[i] + offset;
}
modelToBlockOut.Positions = pts;

Problems solved!

Just for my information, is this as good as any other way of handling dynamic meshes?

Thanks.
  


Messages In This Thread
Updating visuals created from MeshGeometry3D - by darrenlittlefair - 12-21-2016, 10:01 AM

Forum Jump:


Users browsing this thread:
1 Guest(s)