Mapping MediaElement onto a Sphere with WPF

29 ביוני 2009

In my previous post I created a 3D cube, mapped a MediaElement onto each of its faces and animated the camera around the cube. In this post, I will replace the 3D cube with a sphere and wrap the video onto the surface of the sphere. I omit the camera animation for simplicity, but you can add it back, of course. You can download the source code here. In order to create the sphere mesh I made use of Charles Petzold’s elegant SphereMeshGenerator. In Chapter 6 of his book (3D Programming for Windows: Three-Dimensional Graphics Programming for the Windows Presentation Foundation) Petzold...
תגיות: , , , ,
תגובה אחת

Animating the Position of a 3D Camera in WPF

22 ביוני 2009

In this post we will use Point3DAnimationUsingPath from the previous post to rotate the viewpoint around a 3D cube while playing a video on all six of its faces. You can download the complete source, with the Point3DAnimationUsingPath class from here. "Look at me! Look at me now!" said the cat. "With a cup and a cake On the top of my hat! I can hold up TWO books! I can hold up the fish!...
5 תגובות

A Custom Animation Class – Point3DAnimationUsingPath

21 ביוני 2009

For 2D graphics WPF provides three classes for animating points: PointAnimation (for linear interpolation), PointAnimationUsingKeyFrames and PointAnimationUsingPath. For 3D graphics WPF provides only two: Point3DAnimation (for linear interpolation) and Point3DAnimationUsingKeyFrames. There is no built in class for animating points over a path in three dimensions. In this post I will show you a custom animation class that I wrote to partially fill that gap. In the next post I will put it to use in a 3D animation demo. Requirement Provide an animation class that enables the animation of a 3D point over a 3D...
תגיות: , , ,
2 תגובות

Instrumentation Tip for ASMX Web Services

19 ביוני 2009

This post describes a simple way to trace all method invocations on an ASMX Web Service. The source code for the demo can be downloaded here. Problem I am currently adding some features to a customer’s application that exposes its core functionality as an ASMX Web Service. About every mistake in the book was made in the design of this product, so I was having a rough time understanding the API of the service, never mind the implementation. For a start, the methods are not strongly typed, mostly accepting strings as parameters, and there are over...
3 תגובות

Instrumentation Tip for ASP.NET

The System.Diagnostics namespace provides a simple and extensible model for tracing. This post is about leveraging that model in ASP.NET (Web Applications, ASMX Web Services, Http Modules and Http Handlers). Problem The System.Diagnostics classes, Trace and Debug, simplify instrumentation by placing it's configuration outside your code, in one centralized place. That place can be an initialization method or a configuration file. Use of a configuration file allows you to change instrumentation behavior after deployment. Moreover, the TraceListener model implemented by these classes allows you to extend instrumentation behavior by injecting your own custom listeners into the...
אין תגובות

WCF Transactions – Barebones Demo – Part 4

15 ביוני 2009

In this post we will run the demo developed in the previous posts in the series and analyze the results. The last sections contain conclusions and suggestions for further reading. The other posts in this series are: WCF Transactions – Barebones Demo – Overview WCF Transactions – Barebones Demo – Part 1 (Tools) WCF Transactions – Barebones Demo – Part 2 (Service Code) WCF Transactions – Barebones Demo – Part 3 (Client Code) You can download the source code for the series...
תגיות: , ,
3 תגובות

WCF Transactions – Barebones Demo – Part 3

In this post we will develop the client side of a WCF service that is capable of participating in the client transaction. Other posts in this series are: WCF Transactions – Barebones Demo – Overview WCF Transactions – Barebones Demo – Part 1 (Tools) WCF Transactions – Barebones Demo – Part 2 (Service Code) WCF Transactions – Barebones Demo – Part 4 (Analysis) You can download the source code for the series from here. In Parts 1 and 2...
אין תגובות

WCF Transactions – Barebones Demo – Part 2

In this post we will develop a WCF service that is capable of participating in a client transaction. The other posts in this series are: WCF Transactions – Barebones Demo – Overview WCF Transactions – Barebones Demo – Part 1 (Tools) WCF Transactions – Barebones Demo – Part 3 (Client Code) WCF Transactions – Barebones Demo – Part 4 (Analysis) You can download the source code for the series from here. The Service...
אין תגובות

WCF Transactions – Barebones Demo – Part 1

In this post we will prepare two tools that will help us trace WCF’s transaction support in our demo. Both tools can be found in the Common class library in the source code. The other posts in this series are: WCF Transactions – Barebones Demo – Overview (Tools) WCF Transactions – Barebones Demo – Part 2 (Service Code) WCF Transactions – Barebones Demo – Part 3 (Client Code) WCF Transactions – Barebones Demo – Part 4 (Analysis) You can download the source...
אין תגובות

WCF Transactions – Barebones Demo – Overview

14 ביוני 2009

In the next four posts, we will be building a barebones project to demonstrate WCF’s support for Transactions. The other posts in this series are: WCF Transactions – Barebones Demo – Part 1 (Tools) WCF Transactions – Barebones Demo – Part 2 (Service Code) WCF Transactions – Barebones Demo – Part 3 (Client Code) WCF Transactions – Barebones Demo – Part 4 (Analysis) You can download the source code for the series from here. The demo focuses on the...
תגיות: ,
אין תגובות