Welcome to MSDN Blogs Sign in | Join | Help

Lester's WPF blog


Simple, easy & beautiful
3.5 features: Viewport2DVisual3D

Viewport2DVisual3D .... this new feature makes things a lot easier in the 3D world.. What this enables is putting interactive 2D on 3D.

 This makes things like having a textbox in 3D a breeze...

 <Viewport2DVisual3D x:Name="vp2d_multiple_children" Geometry="{StaticResource mesh}">

            <Viewport2DVisual3D.Material>

                        <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" Brush="White"/>

            </Viewport2DVisual3D.Material>

            <TextBox />

  </Viewport2DVisual3D>

One other thing is mapping 3D points to 2D is so much more easier... Earlier on I had a post on mapping a mouseclick on a 3d model to a 2d coordinate. This involved using some barycentric coordinates and such... Now all you need is call e.GetPosition(relativeTo) in the mouse event handler... tada!!... your coordinates are ready...

so using this new stuff i created a simple app for keeping track of your travels.

right clicking on the globe puts a tag on the globe. Clicking on the red button deletes the tag. Clicking on the person opens a richtextbox so you could add some notes, tooltips and paste some pics in. Left click again sets the globe in motion. You can also drag the globe around just in case you visited the poles. Closing the app serializes the content - so that on startup the tags are remembered... :) ... The project uses 3DTools library for the trackball support

The project is attached.. have fun..

Also if you just need the binaries you can download the zip file and run the installable.

Share this post

 

Posted: Thursday, August 30, 2007 4:09 PM by llester
Attachment(s): Photo Globe.zip

Comments

Noticias externas said:

Viewport2DVisual3D .... this new feature makes things a lot easier in the 3D world.. What this enables

# August 30, 2007 2:16 PM

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

# August 31, 2007 10:42 AM

Jose Luis said:

So great!! many thanks for sharing :)

# September 6, 2007 5:38 PM

Jose Luis said:

Great feature and great example. Congrats Lester!

# September 9, 2007 2:46 PM

Greg Schechter's Blog said:

When incorporating 3D support into WPF, we strived for integration with the rest of the system, and sufficient

# October 26, 2007 4:02 AM

Noticias externas said:

When incorporating 3D support into WPF, we strived for integration with the rest of the system, and sufficient

# October 26, 2007 4:13 AM

Stefan Wick's Weblog said:

WPF 3.5 includes an exciting new feature: Viewport2DVisual3D. It makes building interactive 3D experiences

# October 31, 2007 5:17 PM

Noticias externas said:

WPF 3.5 includes an exciting new feature: Viewport2DVisual3D. It makes building interactive 3D experiences

# October 31, 2007 6:11 PM
New Comments to this post are disabled
Page view tracker