Share via


Staying Sane in WPF 3D: Scale, Rotate, then Translate or Your Head May Explode

I was recently helping a friend with an Avalon 3D app and he was very confused as to why his models seemed to vanish with certain transforms.  He had committed a common newbie mistake: his Transform3DGroup did not follow the recommended ordering: scale, rotate and then translate.  You can really confuse yourself if you break from this ordering.  Way back in 2004, Dan Lehenbauer had a nice post that explained this if you want to understand why this ordering typically does what you expect and why a different order causes strange things to happen. But just remember: SRT! 

Kind of like Indigo: Secure, Reliable, Transacted.

Comments

  • Anonymous
    January 24, 2006
    Hi,

    I am getting a black screen instead of playing a WMV file by using a <MediaElement> in XAML.

    I tried this after installing Windows Media Player 10 on my Desktop machine which has Windows XP Prof SP2 OS and software’s like VS 2005 RTM and WinFX Dec 2005 CTP. Please provide some solution in what way I can resolve this Problem.

    Here is my sample XAML Code:

    <DockPanel Name="DockPanel1" xmlns="http://schemas.microsoft.com/winfx/avalon/2005" xmlns:x="http://schemas.microsoft.com/winfx/xaml/2005">
    <MediaElement Height="350" Source="C:MediaFilesSample.wmv" Width="200" Name="MediaElement1" />
    </DockPanel>

    Thanks in advance,
    MDeevi.

  • Anonymous
    January 24, 2006
    You probably need to update your video card drivers.