Click here to Skip to main content
15,885,899 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to view my 3D object on the screen in four different angles using a perspective and orthographic camera. I am thinking of creating four radio buttons each for one camera, checking on which will switch over to that particular view. How to do this in WPF ? I have searched in google, but have not found a convincing answer for a betginner. Any help would be much appreciated. Thanks

PS: I tried using <viewport3d.camera> four times, but I get an error that the method is already defined or something.

Also, Please let me know how to move the camera on 3D screen by dragging the mouse during run-time. I would like to view an object from different angles without rotating it.

Thanks
Posted

1 solution

I want to view my 3D object on the screen in four different angles
Any one 3d scene (Viewport3D) can only have one camera. if you want 4 different views then you have to have four Viewport3D and replicate your 3d world for each of them.

PS: I tried using four times, but I get an error that the method is already defined or something.
You should have shown us what you had tried and the exact error.

Please let me know how to move the camera on 3D screen by dragging the mouse during run-time
This is a Q&A not a "write me an article", the math involved in this and the amount of code well is not easy to understand, especially not when we do not know your level. And there is already tons of articles out there on that subject. E.g.
WPF 3D Primer[^]
 
Share this answer
 
Comments
steersteer 13-Sep-11 10:22am    
Thanks for your reply. Have found some articles about moving the camera around a 3D scene. Working on it.
Simon Bang Terkildsen 13-Sep-11 11:56am    
Cool, I just want to make clear that you're ofcourse very welcome to ask about any specific problems you run into when implementing your mouse handling for moving the camera.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900