You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a 3D model (OBJ file).
I use the SharpDX importer to import the file to as a HelixToolkitScene object
Importer Importer = new HelixToolkit.Wpf.SharpDX.Assimp.Importer();
this.Scene = Importer.Load(Filename);
The scene is then added to a SceneNodeGroupModel3D
this.GroupModel.AddNode(this.Scene.Root);
and successfully displayed via a binding to my HelixViewPort3DX.
I later manipulate the rotation and position of the object by manipulating the model matrix of the the HelixToolkitScene object and updating the corresponding SceneNodeGroupModel3D. This works as expected and the model moves on my ViewPort3DX.
I later decompose the HelixToolkitScene object into a Geometry3D[] with
var geometry = this.Scene.Root.Traverse().Where(z => (z is MeshNode)).Select(m => ((MeshNode)m).Geometry).ToArray();
and I then use this to create an array of triangles.
The problem is the geometry represents the unmodified geometry which is unchanged by the rotations or translations. How do I get the geometry from a rotated/translated object.
Greatly appreciate your help.
Best regards
Ian
The text was updated successfully, but these errors were encountered:
I have a 3D model (OBJ file).
I use the SharpDX importer to import the file to as a HelixToolkitScene object
Importer Importer = new HelixToolkit.Wpf.SharpDX.Assimp.Importer();
this.Scene = Importer.Load(Filename);
The scene is then added to a SceneNodeGroupModel3D
this.GroupModel.AddNode(this.Scene.Root);
and successfully displayed via a binding to my HelixViewPort3DX.
I later manipulate the rotation and position of the object by manipulating the model matrix of the the HelixToolkitScene object and updating the corresponding SceneNodeGroupModel3D. This works as expected and the model moves on my ViewPort3DX.
I later decompose the HelixToolkitScene object into a Geometry3D[] with
var geometry = this.Scene.Root.Traverse().Where(z => (z is MeshNode)).Select(m => ((MeshNode)m).Geometry).ToArray();
and I then use this to create an array of triangles.
The problem is the geometry represents the unmodified geometry which is unchanged by the rotations or translations. How do I get the geometry from a rotated/translated object.
Greatly appreciate your help.
Best regards
Ian
The text was updated successfully, but these errors were encountered: