次の方法で共有


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

 

Photo Globe.zip

Comments

  • Anonymous
    August 30, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/08/30/35-features-viewport2dvisual3d/

  • Anonymous
    August 30, 2007
    Viewport2DVisual3D .... this new feature makes things a lot easier in the 3D world.. What this enables

  • Anonymous
    August 31, 2007
    You've been kicked (a good thing) - Trackback from DotNetKicks.com

  • Anonymous
    September 06, 2007
    So great!! many thanks for sharing :)

  • Anonymous
    September 09, 2007
    Great feature and great example. Congrats Lester!

  • Anonymous
    October 25, 2007
    When incorporating 3D support into WPF, we strived for integration with the rest of the system, and sufficient

  • Anonymous
    October 25, 2007
    When incorporating 3D support into WPF, we strived for integration with the rest of the system, and sufficient

  • Anonymous
    October 31, 2007
    WPF 3.5 includes an exciting new feature: Viewport2DVisual3D. It makes building interactive 3D experiences

  • Anonymous
    October 31, 2007
    WPF 3.5 includes an exciting new feature: Viewport2DVisual3D. It makes building interactive 3D experiences