Okay after a ton of reading in this thread all the way back to 2019
I found a comment that mentions a prereleased package : helixtoolkit.sharpdx.core.wpf
You have to use a package manager console to get it
Install-Package HelixToolkit.SharpDX.Core.Wpf -Version 2.12.0
Then you remove HelixToolkit.WPF.SharpDX Package
After that, there is no difference in scenenode. If only this information was publicly accessible
@holance I understand the difference in namespace; but from my testing, importing things like gitF is not possible in the available file reader classes in HelixToolkit.WPF.SharpDX since it doesn't completely wrap assimp (from what I can see).
Where HelixToolkit.SharpDx.Core does completely wrap assimp. So I got my gitF loader working.
Next, since I am using WPF, I had to download HelixToolkit.SharpDx.Core.WPF using the package manager console as the package manager didn't publicly list the package nor is there any documentation about it anywhere I could find.
I suggest adding some documentation regarding the importance of selecting either namespace and the solutions for things like trying to use core.sharpdx with assimp and WPF.
All around I'm finding it hard and losing time to solve issues. Now I have a SceneNodeGroupModel3D which contains all of the scenenodes imported using core.sharpdx.assimp, which allows me to drop nodes into the WPF Viewport3DX, however I am not getting any bounds feedback on the SceneNodeGroupModel3D, I instead of to traverse and use encapsulate methods to add up all of the meshnode geometry bounds.
Unless, is there something I can do to refresh the bounds information for the node tree?
NodeGroup_OnClearto listen for events on the group and maintain a bounding box in a BoundingBoxGroup class. This is how the octree works as well if you need some reference.
Specified element is already the logical child of another element. Disconnect it first.. If I remove the Viewport3DX it doesn't seem to have this issue. Afaict I'm not re-using anything here, but somehow it seems like maybe the Viewport is reusing things internally. Perhaps I'm not correctly disposing things. Any ideas as to what I could be doing wrong?
// Load the object. SceneNode scene = await OpenFile("test_model.obj"); // Create the arrow model. var arrowModel = new MeshGeometryModel3D(); MeshBuilder mb = new MeshBuilder(); mb.AddArrow(new Vector3(0, 0, 0), new Vector3(0, 0, 1), 0.05); arrowModel.Geometry = mb.ToMeshGeometry3D(); arrowModel.Material = PhongMaterials.Gray; arrowModel.Transform = Transform3D.Identity; // Group them together. // Is this the right type of "group" to use? SceneNodeGroupModel3D group = new SceneNodeGroupModel3D(); group.AddNode(scene); group.AddNode(arrowModel); // This is the line that gives an error - "cannot convert from MeshGeometryModel3D to SceneNode"
sharpdx_direct3d11_effects_x86.dllin HelixToolkit.SharpDX versions after v2.0 release
I did ZoomFit
Vector2 center = new Vector2(Convert.ToSingle((xMax + xMin) / 2), Convert.ToSingle((yMax + yMin) / 2));//Center 2D
Vector3 center3D = new Vector3();
DieCreationWindow.ViewPort.UnProjectOnPlane(center, new Vector3(0, 0, 0), DieCreationWindow.ViewPort.Camera.LookDirection.ToVector3(), out center3D);//Find center 3D
DieCreationWindow.ViewPort.ZoomToRectangle(new Rect(new System.Windows.Point(xMin - 5, yMin - 5), new Size(sizeX + 10, sizeY + 10)));
Vector3D lookDirection = DieCreationWindow.ViewPort.Camera.LookDirection;
DieCreationWindow.ViewPort.Camera.LookDirection = lookDirection;
after using it then use the zoom to maximize, model vibrates