Rotate objects in WPF ZAM 3D - wpf

How do I rotate a 3D object which are created from ZAM 3D tool in XAML, I have created some objects by using ZAM 3D, here we can rotate objects in Trackball or in Camera mode, but it does not works in XAML. Can u please suggest me how can i achieve the same thing in XAML portion? it will be much appreciated.
In brief,
1. How to export multiple camera views from ZAM 3D to XAML
(or)
2. How to use camera view from mouse pointer
Regards,Raijan_cv

Related

3D WPF charts with custom objects

I am new to 3D and charting in WPF.
What I would like to do is building a chart with my own 3D objects inside it. I don't want to display classical points or bubbles, but my own 3D objects (cubes for example). And I want that the user can interact with each object on the chart (rotate a cube using mouse for example).
I wonder if there are libraries to do this kind of things or if I have to do it by myself using WPF 3D or something else.

Attaching 2D objects to 3D objects in WPF

I have a Viewport3D object containing a scene of hierarchical Model3D objects (grouped in Model3DGroups).
I need to "attach" 2D objects to 3D elements in the scene.
I read some articles on 3D projection but I couldn't fully understand how to apply my WPF scene data to those solutions.
What is the proper way to do that? I also tried Petzold.Media3D library but I didn't understand how to use it...
Thanks
I think you are looking for the Viewport2DVisual3D class. It allows you to render any Visual2D into the 3D space.
Searching the web for more info on this class will give you examples and videos explaining how it works.
Anyway, if you are doing any WPF 3D you also need to know about the Helix Toolkit - an awesome (free) WPF 3D toolkit.
It has two classes added recently that might also be relevant to what you are doing:
BillboardVisual3D (quad that always faces camera) and
TextBillboardVisual3D (text that always faces camera).
There are useful if you want to make some 2D image that must always face towards the 3D camera.

Convert 3D mesh to 2D and place it on WPF Canvas

Is it possible to convert 3D object from Viewport3D and show it on Canvas, but conversion MUST NOT be depended from a camera position and its view point.
By another words using WPF i would like to make 4 views like in 3Ds Max, such as: Perspective (for 3D objects) and Front, Top, Left views (for 2D ).
Perspective view is a Viewport3D, but how show all 3D objects from the Viewport to the other views - Top, Front and Left ?
Mathematically speaking, no, it's not possible.
However, you should be able to simulate that by specifying a Camera Position that is top, front, and left. Can't you calculate approximately where that is based on the bounds of the 3D object?
http://en.wikipedia.org/wiki/Homogeneous_coordinates#Use_in_computer_graphics

Place a control inside 3D object wpf

There are several tutorials that show you how to create 3d objects such as thisIntroduction to WPF 3D. Moreover I could create the 3d objects in other applications and then import them with expression blend.
If my 3d object is a cube for example how could I place a user control in one of the faces of the cube? When I imported my 3d object to my application expression blend created a viewport control. I was wondering if it is possible to place a control inside that object such as a button. I have tried placing the button inside that viewport and it does not work. Is it possible to place a user control inside a 3d object?
You can use Viewport2dVisual3d class.
This class allows live interactive 2D content to be directly mapped to a 3D surface.
You should break the mesh up to have a separate mesh for each face then use a Viewport2dVisual3d for each face and add your control to that face.

WPF: is it possible to have a content container move 3d dimenisional in a modelvisual3d element?

i was learning 3d animation in wpf.. and most tutorials would make an image 3d then play with it alittle ..moving and changing dimensions..
so it got me wondering.. is it possible to add some type of data container (like a grid canvas.. or whatever).. and make it move in 3d dimensons too ?
i am not talking about skewing.. i am talking about real 3d movement..
What a lot of examples do in .Net3.0 is use visual brush to draw the visual of the control/data container on a surface in 3D space. And then map the mouse and keyboard events back to the 2D control (through a translation).
They are a lot of examples that illustrate this. (one for instance is)
An alternative is to use a panel that layouts your control in 3D space using one of the thriple opensource project Or you could read the code (since it's opensource) as a starting point.

Resources