ChevyCP wrote at 2011-11-22 18:52:
First off, awesome code! Very well done! Using the "subdivision demo", I played with the options and found a cube I like. I recreated it in a new project with just the options neccessary. My question is what is the best way to export that mesh. I'm thinking of using it as a windows resource so I can view VS design mode as well as in blend.
My next question is what is the best way to put controls on that cube. Basically I have an app that has different menus, but instead of boring pop-ups I want to have a cube spin around to the appropriate side. I have this working using viewport2dvisual3d panels as in the example here:
The difference is instead of a cube with sharp corners, I want one with round corners. So my thinking is I use your tools to create the 3d cube I'm after and wrap my controls around it. Any info would be much appreciated!
objo wrote at 2011-11-23 06:45:
hi ChevyCP, note that the subdivided cube is not containing texture coordinates. It could, but that has to be added into the subdivision algorithm. Sorry I have not used the Viewport2DVisual3D panels, so cannot give you any input there.
Use the XamlExporter if you want to use the subdivided cube in Blend!
ChevyCP wrote at 2011-11-29 16:32:
Thanks. I'm giving that a try, but get the following error: "Cannot serialize a generic type 'System.Collections.Generic.List`1[System.Int32]'." Here is my code where "Cube" is the name of my MeshVisual3D:
XamlExporter exporter = new XamlExporter("C:\\directory\\myExport.xaml"); exporter.CreateResourceDictionary = true; exporter.Export(Cube); exporter.Close();
objo wrote at 2011-12-03 12:04:
I think you can only use built-in Windows.Media.Media3D Visual3D when using the XamlExporter.
Otherwise you need to register the custom types with the XamlWriter - I have not checked this.
Customer support service by UserEcho