I have a WPF
project that contains a 3D models. I did search a lot about Viewport3D
but didn't found any helpful results to draw a barrel in 3D.
Also the Camera
move is kinda bad, how can I edit it too?
Asked
Active
Viewed 115 times
0
-
With WPF/Viewport3D you should create a MeshGeometry3D which contains the vertices/normals and triangles, and place it inside a ModelVisual3D (which contains also the material). [Here](https://learn.microsoft.com/en-us/dotnet/desktop/wpf/graphics-multimedia/how-to-apply-multiple-transformations-to-a-3-d-model?view=netframeworkdesktop-4.8) is an example. – Jeroen van Langen Feb 16 '22 at 07:36
-
Thank You For Answer I've already saw that example before but it's not what I'm looking for. But I need to move it with mouse, I know how to draw a square or a circle but I have no idea about the barrel. Is there any way which I can draw the barrel? do you have any good tutorials about it? – Abdalrohman AL HAJ ALI Feb 16 '22 at 07:59
-
You need a model of a barrel. You could use rotation of the camera with your mouse. [How to rotate camera in ViewPort3D using mouse in WPF?](https://stackoverflow.com/questions/9049959/how-to-rotate-camera-in-viewport3d-using-mouse-in-wpf) – Jeroen van Langen Feb 16 '22 at 08:46