SlideShare a Scribd company logo
1 of 72
Download to read offline
Mohammad Shaker
mohammadshaker.com
WPF Starter Course
@ZGTRShaker
2011, 2012, 2013, 2014
WPF Showcase
L03 – 3D Rendering and 3D Animations
3D Rendering
3D Rendering
3D Models
3D Models
3D Models
3D Models
3D Models
3D Models
3D Models
• With Texturing!
3D Models
• Visual Hit!
3D Models
Tools to fire up a 3D Area!
Tools to fire up a 3D Area!
• Set the desired area
– Viewport3D
• Light the area with a DirectionalLight!
– new ModelVisual3D
{
Content = new DirectionalLight
{
Color = Colors.White,
Direction = new Vector3D(0, 0, -1)
}
});
• Set a camera to look around!
– PerspectiveCamera
3D Rendering
3D Rendering
3D Rendering
The Craziness of Code Behind!
3D Rendering
What do u need to create a cuboid?!
So, Let’s start!
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
3D Rendering
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
3D Rendering
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
<Viewport3D Name="viewport3D">
<ModelVisual3D>
<ModelVisual3D.Content>
<DirectionalLight Color="White" Direction="-2,-3,-1" />
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D>
3D Rendering
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
3D Rendering
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
Set a camera to look around!
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
class CameraManagement
{
public PerspectiveCamera Camera { set; get; }
public CameraManagement(Viewport3D viewport3D)
{
this.Camera = new PerspectiveCamera();
this.Camera.FarPlaneDistance = 500;
this.Camera.NearPlaneDistance = 1;
// LookDirection
this.Camera.LookDirection = new Vector3D(-10, -15, -25);
// UpDirection
this.Camera.UpDirection = new Vector3D(0, 1, 0);
// Position
this.Camera.Position = new Point3D(50, 100, 150);
this.Camera.FieldOfView = 70;
this.Camera.Transform = new Transform3DGroup();
viewport3D.Camera = this.Camera;
}
}
Set a camera to look around!
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
CameraManagement cameraManagement = new CameraManagement(viewport3D);
}
}
3D Rendering
• Set the desired area
• Light the area with a DirectionalLight!
• Set a camera to look around!
• Draw whatever u want!
– Our Cuboid!
3D Rendering
1. Set the desired area
2. Light the area with a DirectionalLight!
3. Set a camera to look around!
4. Draw whatever u want!
– Our Cuboid!
• What do u need to create a Cuboid?!
• Bunch of Triangles!
3D Rendering
1. Set the desired area
2. Light the area with a DirectionalLight!
3. Set a camera to look around!
4. Draw whatever u want!
– Our Cuboid!
• What do u need to create a Cuboid?!
• Bunch of 16 Triangles!
3D Rendering
class Triangle
{
public static Model3DGroup CreateTriangleModelGroup(Point3D p0,
Point3D p1,
Point3D p2,
Color myColor)
{
MeshGeometry3D mesh = new MeshGeometry3D();
mesh.Positions.Add(p0);
mesh.Positions.Add(p1);
mesh.Positions.Add(p2);
mesh.TriangleIndices.Add(0);
mesh.TriangleIndices.Add(1);
mesh.TriangleIndices.Add(2);
Material material = new DiffuseMaterial(new SolidColorBrush(myColor));
GeometryModel3D model = new GeometryModel3D(mesh, material);
Model3DGroup group = new Model3DGroup();
group.Children.Add(model);
return group;
}
}
3D Rendering
class Cuboid
{
public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color)
{
Model3D model = CreateModelGroup(initialPosition, length, width, height, color);
ModelVisual3D visualModel = new ModelVisual3D();
visualModel.Content = model;
viewport3D.Children.Add(visualModel);
}
private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color)
{
Model3DGroup group = new Model3DGroup();
// *HERE* //
return group;
}
public static Point3D GetSummedPoint(Point3D p1, Point3D p2)
{
Point3D myPoint = new Point3D();
// Manipulate Coordinates
myPoint.X = p1.X + p2.X;
myPoint.Y = p1.Y + p2.Y;
myPoint.Z = p1.Z + p2.Z;
return myPoint;
}
}
3D Rendering
class Cuboid
{
public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color)
{
Model3D model = CreateModelGroup(initialPosition, length, width, height, color);
ModelVisual3D visualModel = new ModelVisual3D();
visualModel.Content = model;
viewport3D.Children.Add(visualModel);
}
private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color)
{
Model3DGroup group = new Model3DGroup();
// *HERE* //
return group;
}
public static Point3D GetSummedPoint(Point3D p1, Point3D p2)
{
Point3D myPoint = new Point3D();
// Manipulate Coordinates
myPoint.X = p1.X + p2.X;
myPoint.Y = p1.Y + p2.Y;
myPoint.Z = p1.Z + p2.Z;
return myPoint;
}
}
//* HERE *//
Point3D p0 = initialPosition;
Point3D p1 = GetSummedPoint(initialPosition, new Point3D(width, 0, 0));
Point3D p2 = GetSummedPoint(initialPosition, new Point3D(width, 0, length));
Point3D p3 = GetSummedPoint(initialPosition, new Point3D(0, 0, length));
Point3D p4 = GetSummedPoint(initialPosition, new Point3D(0, height, 0));
Point3D p5 = GetSummedPoint(initialPosition, new Point3D(width, height, 0));
Point3D p6 = GetSummedPoint(initialPosition, new Point3D(width, height, length));
Point3D p7 = GetSummedPoint(initialPosition, new Point3D(0, height, length));
//front side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p3, p2, p6, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p3, p6, p7, color));
//right side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p1, p5, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p5, p6, color));
//back side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p1, p0, p4, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p1, p4, p5, color));
//left side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p0, p3, p7, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p0, p7, p4, color));
//top side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p7, p6, p5, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p7, p5, p4, color));
//bottom side triangles
group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p3, p0, color));
group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p0, p1, color));
3D Rendering
class Cuboid
{
public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color)
{
Model3D model = CreateModelGroup(initialPosition, length, width, height, color);
ModelVisual3D visualModel = new ModelVisual3D();
visualModel.Content = model;
viewport3D.Children.Add(visualModel);
}
private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color)
{
Model3DGroup group = new Model3DGroup();
// *HERE* //
return group;
}
public static Point3D GetSummedPoint(Point3D p1, Point3D p2)
{
Point3D myPoint = new Point3D();
// Manipulate Coordinates
myPoint.X = p1.X + p2.X;
myPoint.Y = p1.Y + p2.Y;
myPoint.Z = p1.Z + p2.Z;
return myPoint;
}
}
3D Rendering
• Now just call and play! :D
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
CameraManagement cameraManagement = new CameraManagement(viewport3D);
Cuboid myFirstCuboid = new Cuboid(viewport3D, new Point3D(0, 0, 0), 40, 40, 40, Colors.Red);
}
}
3D Rendering
3D Rendering
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
CameraManagement cameraManagement = new CameraManagement(viewport3D);
Cuboid myFirstCuboid = new Cuboid(viewport3D, new Point3D(0, 0, 0), 50, 60, 10, Colors.Red);
}
}
3D Rendering
3D Rendering
Hit Testing
Project “Track-Ball”
Provided by the WPF team 3-D tools
Visit: http://www.codeplex.com/3DTools/
<Window xmlns:tools="clr-namespace:_3DTools;assembly=3DTools"... >
Then you can easily add the TrackballDecorator to your markup:
<tools:TrackballDecorator>
<Viewport3D>
...
</Viewport3D>
</tools:TrackballDecorator>
Hit Testing
Viewport2DVisual3D
Viewport2DVisual3D
awesome Control!
Viewport2DVisual3D!
Viewport2DVisual3D!
Viewport2DVisual3D!
Viewport2DVisual3D
• We’ll do this!
Viewport2DVisual3D
Viewport2DVisual3D
Viewport2DVisual3D From Code Behind!
Viewport2DVisual3D
• What’s needed to show 2D components in 3D environment?!
Viewport2DVisual3D
• What’s needed to show 2D components in 3D environment?!
Viewport2DVisual3D
• What’s needed to show 2D components in 3D environment?!
Viewport2DVisual3D
private void CreateMeshGeometry(Point3D initialPoint)
{
double pointParam = 0.5;
initialPoint.X = -initialPoint.X;
initialPoint.Y = -initialPoint.Y;
initialPoint.Z = -initialPoint.Z;
MeshGeometry3D mesh = new MeshGeometry3D();
mesh.Positions = new Point3DCollection
{
HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint),
HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ),
HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint),
HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint)
};
mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 });
mesh.TextureCoordinates = new PointCollection(new Point[]
{
new Point(0, 0),
new Point(0, 1),
new Point(1, 1),
new Point(1, 0)
});
this._viewport2DVisual3D.Geometry = mesh;
var material = new DiffuseMaterial
{
Brush = Brushes.White
};
Viewport2DVisual3D.SetIsVisualHostMaterial(material, true);
this._viewport2DVisual3D.Material = material;
}
Viewport2DVisual3D
private void CreateMeshGeometry(Point3D initialPoint)
{
double pointParam = 0.5;
initialPoint.X = -initialPoint.X;
initialPoint.Y = -initialPoint.Y;
initialPoint.Z = -initialPoint.Z;
MeshGeometry3D mesh = new MeshGeometry3D();
mesh.Positions = new Point3DCollection
{
HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint),
HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ),
HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint),
HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint)
};
mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 });
mesh.TextureCoordinates = new PointCollection(new Point[]
{
new Point(0, 0),
new Point(0, 1),
new Point(1, 1),
new Point(1, 0)
});
this._viewport2DVisual3D.Geometry = mesh;
var material = new DiffuseMaterial
{
Brush = Brushes.White
};
Viewport2DVisual3D.SetIsVisualHostMaterial(material, true);
this._viewport2DVisual3D.Material = material;
}
Viewport2DVisual3D
private void CreateMeshGeometry(Point3D initialPoint)
{
double pointParam = 0.5;
initialPoint.X = -initialPoint.X;
initialPoint.Y = -initialPoint.Y;
initialPoint.Z = -initialPoint.Z;
MeshGeometry3D mesh = new MeshGeometry3D();
mesh.Positions = new Point3DCollection
{
HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint),
HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ),
HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint),
HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint)
};
mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 });
mesh.TextureCoordinates = new PointCollection(new Point[]
{
new Point(0, 0),
new Point(0, 1),
new Point(1, 1),
new Point(1, 0)
});
this._viewport2DVisual3D.Geometry = mesh;
var material = new DiffuseMaterial
{
Brush = Brushes.White
};
Viewport2DVisual3D.SetIsVisualHostMaterial(material, true);
this._viewport2DVisual3D.Material = material;
}
Viewport2DVisual3D
• So how can we add 2D Components?!
Viewport2DVisual3D
• So how can we add 2D Components?!
– So easy!
Viewport2DVisual3D
• So how can we add 2D Components?!
– So easy!
_viewport2DVisual3D.Visual = InitializeVisualArea();
private StackPanel InitializeVisualArea()
{
StackPanel stackPanel = new StackPanel();
TextBlock textBlock = new TextBlock();
textBlock.Text = "Name: " + StudentInfo.Name + Environment.NewLine + "ID: "+ StudentInfo.Id;
Button button = new Button();
button.Content = "Rotate Me!";
button.Click += new RoutedEventHandler(button_Click);
stackPanel.Children.Add(textBlock);
stackPanel.Children.Add(button);
return stackPanel;
}
Viewport2DVisual3D
• So how can we add 2D Components?!
– So easy!
_viewport2DVisual3D.Visual = InitializeVisualArea();
private StackPanel InitializeVisualArea()
{
StackPanel stackPanel = new StackPanel();
TextBlock textBlock = new TextBlock();
textBlock.Text = "Name: " + StudentInfo.Name + Environment.NewLine + "ID: "+ StudentInfo.Id;
Button button = new Button();
button.Content = "Rotate Me!";
button.Click += new RoutedEventHandler(button_Click);
stackPanel.Children.Add(textBlock);
stackPanel.Children.Add(button);
return stackPanel;
}
public StudentInfo StudentInfo
{
get{return _studentInfo;}
set{_studentInfo = value;}
}
Viewport2DVisual3D
See the attached project
Animating Viewport2DVisual3D!
Constant Rotation
Animating Viewport2DVisual3D!
• Just a Rotation
public static void CreateViewportConstantRotationAnimationAroundX(Viewport2DVisual3D viewport2DVisual3D)
{
// Create Animation Around X Axis
var rotationAnimationAroundXAxis = new Rotation3DAnimation();
rotationAnimationAroundXAxis.From = new AxisAngleRotation3D
{
Angle = 0,
Axis = new Vector3D(0, 1, 0) // Y Axis
};
rotationAnimationAroundXAxis.To = new AxisAngleRotation3D
{
Angle = 20,
Axis = new Vector3D(0, 1, 0) // Y Axis
};
rotationAnimationAroundXAxis.Duration = new Duration(TimeSpan.FromSeconds(2));
rotationAnimationAroundXAxis.AutoReverse = true;
rotationAnimationAroundXAxis.RepeatBehavior = RepeatBehavior.Forever;
// Define Property to animate
viewport2DVisual3D.Transform.BeginAnimation(RotateTransform3D.RotationProperty, rotationAnimationAroundXAxis);
}
Animating Viewport2DVisual3D!
Flipping
Animating Viewport2DVisual3D
public static void CreateViewportFlipAnimation(Viewport2DVisual3D viewport2DVisual3D, Point3D position)
{
// Create Animation
Rotation3DAnimation FlipAnimation = new Rotation3DAnimation();
FlipAnimation.From = new AxisAngleRotation3D
{
Angle = 0,
Axis = new Vector3D(1, 0, 0) // X Axis
};
FlipAnimation.To = new AxisAngleRotation3D
{
Angle = 180,
Axis = new Vector3D(1, 0, 0) // X Axis
};
FlipAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
FlipAnimation.AutoReverse = true;
// Define Property to animate
RotateTransform3D rotateTransform3D = new RotateTransform3D();
rotateTransform3D.CenterZ = - position.Z;
rotateTransform3D.BeginAnimation(RotateTransform3D.RotationProperty, FlipAnimation);
viewport2DVisual3D.Transform = rotateTransform3D;
}
Animating Viewport2DVisual3D
public static void CreateViewportFlipAnimation(Viewport2DVisual3D viewport2DVisual3D, Point3D position)
{
// Create Animation
Rotation3DAnimation FlipAnimation = new Rotation3DAnimation();
FlipAnimation.From = new AxisAngleRotation3D
{
Angle = 0,
Axis = new Vector3D(1, 0, 0) // X Axis
};
FlipAnimation.To = new AxisAngleRotation3D
{
Angle = 180,
Axis = new Vector3D(1, 0, 0) // X Axis
};
FlipAnimation.Duration = new Duration(TimeSpan.FromSeconds(1));
FlipAnimation.AutoReverse = true;
// Define Property to animate
RotateTransform3D rotateTransform3D = new RotateTransform3D();
rotateTransform3D.CenterZ = - position.Z;
rotateTransform3D.BeginAnimation(RotateTransform3D.RotationProperty, FlipAnimation);
viewport2DVisual3D.Transform = rotateTransform3D;
}
Animating Camera Movement
Animating Camera!
• Just a Point3DAnimation
public static void MoveCameraDynamicallyWithUserInput(PerspectiveCamera camera, Point3D targettedPosition)
{
if (camera.Position!= targettedPosition)
{
Point3DAnimation animation = new Point3DAnimation();
animation.From = camera.Position;
animation.To = targettedPosition;
animation.Duration = new Duration(TimeSpan.FromSeconds(1.5));
camera.BeginAnimation(PerspectiveCamera.PositionProperty,animation);
}
}
Now test it and
see what you got!
Happy end of course!
I really had so much fun!
Hope you are too!
Take a Look on my other courses
@ http://www.slideshare.net/ZGTRZGTR
Available courses to the date of this slide:
C# Starter, C# Advanced, WPF, C++.NET, XNA, OpenGL, Delphi
http://www.mohammadshaker.com
mohammadshakergtr@gmail.com
https://twitter.com/ZGTRShaker @ZGTRShaker
https://de.linkedin.com/pub/mohammad-shaker/30/122/128/
http://www.slideshare.net/ZGTRZGTR
https://www.goodreads.com/user/show/11193121-mohammad-shaker
https://plus.google.com/u/0/+MohammadShaker/
https://www.youtube.com/channel/UCvJUfadMoEaZNWdagdMyCRA
http://mohammadshakergtr.wordpress.com/
WPF L03-3D Rendering and 3D Animation

More Related Content

What's hot

Java3 d 1
Java3 d 1Java3 d 1
Java3 d 1Por Non
 
Autocad Training Delhi
Autocad Training DelhiAutocad Training Delhi
Autocad Training Delhilalit_625
 
Templateless Marked Element Recognition Using Computer Vision
Templateless Marked Element Recognition Using Computer VisionTemplateless Marked Element Recognition Using Computer Vision
Templateless Marked Element Recognition Using Computer Visionshivam chaurasia
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingMark Kilgard
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184Mahmoud Samir Fayed
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel UpdatingMark Kilgard
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2Sardar Alam
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics PipelineMark Kilgard
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingMark Kilgard
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardwarestefan_b
 

What's hot (16)

Java3 d 1
Java3 d 1Java3 d 1
Java3 d 1
 
OpenGL L05-Texturing
OpenGL L05-TexturingOpenGL L05-Texturing
OpenGL L05-Texturing
 
Autocad Training Delhi
Autocad Training DelhiAutocad Training Delhi
Autocad Training Delhi
 
Templateless Marked Element Recognition Using Computer Vision
Templateless Marked Element Recognition Using Computer VisionTemplateless Marked Element Recognition Using Computer Vision
Templateless Marked Element Recognition Using Computer Vision
 
3 d autocad_2009
3 d autocad_20093 d autocad_2009
3 d autocad_2009
 
TUTORIAL AUTO CAD 3D
TUTORIAL AUTO CAD 3DTUTORIAL AUTO CAD 3D
TUTORIAL AUTO CAD 3D
 
CS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and CullingCS 354 Transformation, Clipping, and Culling
CS 354 Transformation, Clipping, and Culling
 
The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184The Ring programming language version 1.5.3 book - Part 48 of 184
The Ring programming language version 1.5.3 book - Part 48 of 184
 
Scmad Chapter06
Scmad Chapter06Scmad Chapter06
Scmad Chapter06
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
Lec2
Lec2Lec2
Lec2
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
 
CS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasingCS 354 Blending, Compositing, Anti-aliasing
CS 354 Blending, Compositing, Anti-aliasing
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 
3rd Seminar
3rd Seminar3rd Seminar
3rd Seminar
 

Viewers also liked

WPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and TemplatesWPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and TemplatesMohammad Shaker
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is nearBartlomiej Filipek
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPMohammad Shaker
 
XNA L11–Shaders Part 2
XNA L11–Shaders Part 2XNA L11–Shaders Part 2
XNA L11–Shaders Part 2Mohammad Shaker
 
XNA L10–Shaders Part 1
XNA L10–Shaders Part 1XNA L10–Shaders Part 1
XNA L10–Shaders Part 1Mohammad Shaker
 
C# Starter L07-Objects Cloning
C# Starter L07-Objects CloningC# Starter L07-Objects Cloning
C# Starter L07-Objects CloningMohammad Shaker
 
Indie Series 03: Becoming an Indie
Indie Series 03: Becoming an IndieIndie Series 03: Becoming an Indie
Indie Series 03: Becoming an IndieMohammad Shaker
 
Utilizing Kinect Control for a More Immersive Interaction with 3D Environment
Utilizing Kinect Control for a More Immersive Interaction with 3D EnvironmentUtilizing Kinect Control for a More Immersive Interaction with 3D Environment
Utilizing Kinect Control for a More Immersive Interaction with 3D EnvironmentMohammad Shaker
 
C# Advanced L10-Workflow Foundation
C# Advanced L10-Workflow FoundationC# Advanced L10-Workflow Foundation
C# Advanced L10-Workflow FoundationMohammad Shaker
 
Interaction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with PsychologyInteraction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with PsychologyMohammad Shaker
 
C# Advanced L08-Networking+WCF
C# Advanced L08-Networking+WCFC# Advanced L08-Networking+WCF
C# Advanced L08-Networking+WCFMohammad Shaker
 
Short, Matters, Love - Passioneers Event 2015
Short, Matters, Love -  Passioneers Event 2015Short, Matters, Love -  Passioneers Event 2015
Short, Matters, Love - Passioneers Event 2015Mohammad Shaker
 
C# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension MethodsC# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension MethodsMohammad Shaker
 
Car Dynamics with ABS, ESP and GPS Systems
Car Dynamics with ABS, ESP and GPS SystemsCar Dynamics with ABS, ESP and GPS Systems
Car Dynamics with ABS, ESP and GPS SystemsMohammad Shaker
 
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Mohammad Shaker
 

Viewers also liked (18)

WPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and TemplatesWPF L01-Layouts, Controls, Styles and Templates
WPF L01-Layouts, Controls, Styles and Templates
 
WPF - the future of GUI is near
WPF - the future of GUI is nearWPF - the future of GUI is near
WPF - the future of GUI is near
 
C# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASPC# Advanced L09-HTML5+ASP
C# Advanced L09-HTML5+ASP
 
XNA L11–Shaders Part 2
XNA L11–Shaders Part 2XNA L11–Shaders Part 2
XNA L11–Shaders Part 2
 
XNA L10–Shaders Part 1
XNA L10–Shaders Part 1XNA L10–Shaders Part 1
XNA L10–Shaders Part 1
 
C# Starter L07-Objects Cloning
C# Starter L07-Objects CloningC# Starter L07-Objects Cloning
C# Starter L07-Objects Cloning
 
Indie Series 03: Becoming an Indie
Indie Series 03: Becoming an IndieIndie Series 03: Becoming an Indie
Indie Series 03: Becoming an Indie
 
Utilizing Kinect Control for a More Immersive Interaction with 3D Environment
Utilizing Kinect Control for a More Immersive Interaction with 3D EnvironmentUtilizing Kinect Control for a More Immersive Interaction with 3D Environment
Utilizing Kinect Control for a More Immersive Interaction with 3D Environment
 
Delphi L02 Controls P1
Delphi L02 Controls P1Delphi L02 Controls P1
Delphi L02 Controls P1
 
Android L01 - Warm Up
Android L01 - Warm UpAndroid L01 - Warm Up
Android L01 - Warm Up
 
C# Advanced L10-Workflow Foundation
C# Advanced L10-Workflow FoundationC# Advanced L10-Workflow Foundation
C# Advanced L10-Workflow Foundation
 
Interaction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with PsychologyInteraction Design L06 - Tricks with Psychology
Interaction Design L06 - Tricks with Psychology
 
C# Advanced L08-Networking+WCF
C# Advanced L08-Networking+WCFC# Advanced L08-Networking+WCF
C# Advanced L08-Networking+WCF
 
Short, Matters, Love - Passioneers Event 2015
Short, Matters, Love -  Passioneers Event 2015Short, Matters, Love -  Passioneers Event 2015
Short, Matters, Love - Passioneers Event 2015
 
C# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension MethodsC# Starter L06-Delegates, Event Handling and Extension Methods
C# Starter L06-Delegates, Event Handling and Extension Methods
 
Car Dynamics with ABS, ESP and GPS Systems
Car Dynamics with ABS, ESP and GPS SystemsCar Dynamics with ABS, ESP and GPS Systems
Car Dynamics with ABS, ESP and GPS Systems
 
OpenGL Starter L02
OpenGL Starter L02OpenGL Starter L02
OpenGL Starter L02
 
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
Ultra Fast, Cross Genre, Procedural Content Generation in Games [Master Thesis]
 

Similar to WPF L03-3D Rendering and 3D Animation

Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesGetting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesMicrosoft Mobile Developer
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APITomi Aarnio
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Takao Wada
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksJinTaek Seo
 
XNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainXNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainMohammad Shaker
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconftutorialsruby
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconftutorialsruby
 
Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Palak Sanghani
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Korhan Bircan
 
IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference PresentationGonçalo Amador
 
How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?Flutter Agency
 
Introduction to threejs
Introduction to threejsIntroduction to threejs
Introduction to threejsGareth Marland
 
AutoCAD 3D Training Manual
AutoCAD 3D  Training ManualAutoCAD 3D  Training Manual
AutoCAD 3D Training ManualJoe Osborn
 

Similar to WPF L03-3D Rendering and 3D Animation (20)

Games 3 dl4-example
Games 3 dl4-exampleGames 3 dl4-example
Games 3 dl4-example
 
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha PhonesGetting Started with 3D Game Development on Nokia Series 40 Asha Phones
Getting Started with 3D Game Development on Nokia Series 40 Asha Phones
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
 
CGLabLec6.pptx
CGLabLec6.pptxCGLabLec6.pptx
CGLabLec6.pptx
 
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeksBeginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
Beginning direct3d gameprogramming06_firststepstoanimation_20161115_jintaeks
 
XNA L07–Skybox and Terrain
XNA L07–Skybox and TerrainXNA L07–Skybox and Terrain
XNA L07–Skybox and Terrain
 
C++ L11-Polymorphism
C++ L11-PolymorphismC++ L11-Polymorphism
C++ L11-Polymorphism
 
Developing games for Series 40 full-touch UI
Developing games for Series 40 full-touch UIDeveloping games for Series 40 full-touch UI
Developing games for Series 40 full-touch UI
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
building_games_with_ruby_rubyconf
building_games_with_ruby_rubyconfbuilding_games_with_ruby_rubyconf
building_games_with_ruby_rubyconf
 
10java 2d
10java 2d10java 2d
10java 2d
 
Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]Lec 7 28_aug [compatibility mode]
Lec 7 28_aug [compatibility mode]
 
Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)Useful Tools for Making Video Games - XNA (2008)
Useful Tools for Making Video Games - XNA (2008)
 
3 d autocad_2009
3 d autocad_20093 d autocad_2009
3 d autocad_2009
 
IDC 2010 Conference Presentation
IDC 2010 Conference PresentationIDC 2010 Conference Presentation
IDC 2010 Conference Presentation
 
How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?How to Create Custom Shaders in Flutter?
How to Create Custom Shaders in Flutter?
 
Auto cad 3d tutorial
Auto cad 3d tutorialAuto cad 3d tutorial
Auto cad 3d tutorial
 
Introduction to threejs
Introduction to threejsIntroduction to threejs
Introduction to threejs
 
AutoCAD 3D Training Manual
AutoCAD 3D  Training ManualAutoCAD 3D  Training Manual
AutoCAD 3D Training Manual
 

More from Mohammad Shaker

12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian GraduateMohammad Shaker
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game DevelopmentMohammad Shaker
 
Android L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and WearablesAndroid L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and WearablesMohammad Shaker
 
Interaction Design L03 - Color
Interaction Design L03 - ColorInteraction Design L03 - Color
Interaction Design L03 - ColorMohammad Shaker
 
Interaction Design L05 - Typography
Interaction Design L05 - TypographyInteraction Design L05 - Typography
Interaction Design L05 - TypographyMohammad Shaker
 
Interaction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and CouplingInteraction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and CouplingMohammad Shaker
 
Android L04 - Notifications and Threading
Android L04 - Notifications and ThreadingAndroid L04 - Notifications and Threading
Android L04 - Notifications and ThreadingMohammad Shaker
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSMohammad Shaker
 
Interaction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile ConstraintsInteraction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile ConstraintsMohammad Shaker
 
Interaction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and GridsInteraction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and GridsMohammad Shaker
 
Android L10 - Stores and Gaming
Android L10 - Stores and GamingAndroid L10 - Stores and Gaming
Android L10 - Stores and GamingMohammad Shaker
 
Android L06 - Cloud / Parse
Android L06 - Cloud / ParseAndroid L06 - Cloud / Parse
Android L06 - Cloud / ParseMohammad Shaker
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesMohammad Shaker
 
Android L03 - Styles and Themes
Android L03 - Styles and Themes Android L03 - Styles and Themes
Android L03 - Styles and Themes Mohammad Shaker
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and AdaptersMohammad Shaker
 
Indie Series 01: Intro to Games
Indie Series 01: Intro to GamesIndie Series 01: Intro to Games
Indie Series 01: Intro to GamesMohammad Shaker
 
Indie Series 04: The Making of SyncSeven
Indie Series 04: The Making of SyncSevenIndie Series 04: The Making of SyncSeven
Indie Series 04: The Making of SyncSevenMohammad Shaker
 
Indie Series 02: AI and Recent Advances in Games
Indie Series 02: AI and Recent Advances in GamesIndie Series 02: AI and Recent Advances in Games
Indie Series 02: AI and Recent Advances in GamesMohammad Shaker
 
Roboconf DSL Advanced Software Engineering
Roboconf DSL Advanced Software EngineeringRoboconf DSL Advanced Software Engineering
Roboconf DSL Advanced Software EngineeringMohammad Shaker
 

More from Mohammad Shaker (20)

12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate12 Rules You Should to Know as a Syrian Graduate
12 Rules You Should to Know as a Syrian Graduate
 
Unity L01 - Game Development
Unity L01 - Game DevelopmentUnity L01 - Game Development
Unity L01 - Game Development
 
Android L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and WearablesAndroid L07 - Touch, Screen and Wearables
Android L07 - Touch, Screen and Wearables
 
Interaction Design L03 - Color
Interaction Design L03 - ColorInteraction Design L03 - Color
Interaction Design L03 - Color
 
Interaction Design L05 - Typography
Interaction Design L05 - TypographyInteraction Design L05 - Typography
Interaction Design L05 - Typography
 
Interaction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and CouplingInteraction Design L04 - Materialise and Coupling
Interaction Design L04 - Materialise and Coupling
 
Android L05 - Storage
Android L05 - StorageAndroid L05 - Storage
Android L05 - Storage
 
Android L04 - Notifications and Threading
Android L04 - Notifications and ThreadingAndroid L04 - Notifications and Threading
Android L04 - Notifications and Threading
 
Android L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOSAndroid L09 - Windows Phone and iOS
Android L09 - Windows Phone and iOS
 
Interaction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile ConstraintsInteraction Design L01 - Mobile Constraints
Interaction Design L01 - Mobile Constraints
 
Interaction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and GridsInteraction Design L02 - Pragnanz and Grids
Interaction Design L02 - Pragnanz and Grids
 
Android L10 - Stores and Gaming
Android L10 - Stores and GamingAndroid L10 - Stores and Gaming
Android L10 - Stores and Gaming
 
Android L06 - Cloud / Parse
Android L06 - Cloud / ParseAndroid L06 - Cloud / Parse
Android L06 - Cloud / Parse
 
Android L08 - Google Maps and Utilities
Android L08 - Google Maps and UtilitiesAndroid L08 - Google Maps and Utilities
Android L08 - Google Maps and Utilities
 
Android L03 - Styles and Themes
Android L03 - Styles and Themes Android L03 - Styles and Themes
Android L03 - Styles and Themes
 
Android L02 - Activities and Adapters
Android L02 - Activities and AdaptersAndroid L02 - Activities and Adapters
Android L02 - Activities and Adapters
 
Indie Series 01: Intro to Games
Indie Series 01: Intro to GamesIndie Series 01: Intro to Games
Indie Series 01: Intro to Games
 
Indie Series 04: The Making of SyncSeven
Indie Series 04: The Making of SyncSevenIndie Series 04: The Making of SyncSeven
Indie Series 04: The Making of SyncSeven
 
Indie Series 02: AI and Recent Advances in Games
Indie Series 02: AI and Recent Advances in GamesIndie Series 02: AI and Recent Advances in Games
Indie Series 02: AI and Recent Advances in Games
 
Roboconf DSL Advanced Software Engineering
Roboconf DSL Advanced Software EngineeringRoboconf DSL Advanced Software Engineering
Roboconf DSL Advanced Software Engineering
 

Recently uploaded

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 

Recently uploaded (20)

call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 

WPF L03-3D Rendering and 3D Animation

  • 1. Mohammad Shaker mohammadshaker.com WPF Starter Course @ZGTRShaker 2011, 2012, 2013, 2014 WPF Showcase L03 – 3D Rendering and 3D Animations
  • 10. 3D Models • With Texturing!
  • 13. Tools to fire up a 3D Area!
  • 14. Tools to fire up a 3D Area! • Set the desired area – Viewport3D • Light the area with a DirectionalLight! – new ModelVisual3D { Content = new DirectionalLight { Color = Colors.White, Direction = new Vector3D(0, 0, -1) } }); • Set a camera to look around! – PerspectiveCamera
  • 18. The Craziness of Code Behind!
  • 19. 3D Rendering What do u need to create a cuboid?!
  • 20. So, Let’s start! • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want!
  • 21. 3D Rendering • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid!
  • 22. 3D Rendering • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid! <Viewport3D Name="viewport3D"> <ModelVisual3D> <ModelVisual3D.Content> <DirectionalLight Color="White" Direction="-2,-3,-1" /> </ModelVisual3D.Content> </ModelVisual3D> </Viewport3D>
  • 23. 3D Rendering • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid!
  • 24. 3D Rendering • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid!
  • 25. Set a camera to look around! • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid! class CameraManagement { public PerspectiveCamera Camera { set; get; } public CameraManagement(Viewport3D viewport3D) { this.Camera = new PerspectiveCamera(); this.Camera.FarPlaneDistance = 500; this.Camera.NearPlaneDistance = 1; // LookDirection this.Camera.LookDirection = new Vector3D(-10, -15, -25); // UpDirection this.Camera.UpDirection = new Vector3D(0, 1, 0); // Position this.Camera.Position = new Point3D(50, 100, 150); this.Camera.FieldOfView = 70; this.Camera.Transform = new Transform3DGroup(); viewport3D.Camera = this.Camera; } }
  • 26. Set a camera to look around! • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid! public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); CameraManagement cameraManagement = new CameraManagement(viewport3D); } }
  • 27. 3D Rendering • Set the desired area • Light the area with a DirectionalLight! • Set a camera to look around! • Draw whatever u want! – Our Cuboid!
  • 28. 3D Rendering 1. Set the desired area 2. Light the area with a DirectionalLight! 3. Set a camera to look around! 4. Draw whatever u want! – Our Cuboid! • What do u need to create a Cuboid?! • Bunch of Triangles!
  • 29. 3D Rendering 1. Set the desired area 2. Light the area with a DirectionalLight! 3. Set a camera to look around! 4. Draw whatever u want! – Our Cuboid! • What do u need to create a Cuboid?! • Bunch of 16 Triangles!
  • 30. 3D Rendering class Triangle { public static Model3DGroup CreateTriangleModelGroup(Point3D p0, Point3D p1, Point3D p2, Color myColor) { MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions.Add(p0); mesh.Positions.Add(p1); mesh.Positions.Add(p2); mesh.TriangleIndices.Add(0); mesh.TriangleIndices.Add(1); mesh.TriangleIndices.Add(2); Material material = new DiffuseMaterial(new SolidColorBrush(myColor)); GeometryModel3D model = new GeometryModel3D(mesh, material); Model3DGroup group = new Model3DGroup(); group.Children.Add(model); return group; } }
  • 31. 3D Rendering class Cuboid { public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color) { Model3D model = CreateModelGroup(initialPosition, length, width, height, color); ModelVisual3D visualModel = new ModelVisual3D(); visualModel.Content = model; viewport3D.Children.Add(visualModel); } private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color) { Model3DGroup group = new Model3DGroup(); // *HERE* // return group; } public static Point3D GetSummedPoint(Point3D p1, Point3D p2) { Point3D myPoint = new Point3D(); // Manipulate Coordinates myPoint.X = p1.X + p2.X; myPoint.Y = p1.Y + p2.Y; myPoint.Z = p1.Z + p2.Z; return myPoint; } }
  • 32. 3D Rendering class Cuboid { public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color) { Model3D model = CreateModelGroup(initialPosition, length, width, height, color); ModelVisual3D visualModel = new ModelVisual3D(); visualModel.Content = model; viewport3D.Children.Add(visualModel); } private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color) { Model3DGroup group = new Model3DGroup(); // *HERE* // return group; } public static Point3D GetSummedPoint(Point3D p1, Point3D p2) { Point3D myPoint = new Point3D(); // Manipulate Coordinates myPoint.X = p1.X + p2.X; myPoint.Y = p1.Y + p2.Y; myPoint.Z = p1.Z + p2.Z; return myPoint; } } //* HERE *// Point3D p0 = initialPosition; Point3D p1 = GetSummedPoint(initialPosition, new Point3D(width, 0, 0)); Point3D p2 = GetSummedPoint(initialPosition, new Point3D(width, 0, length)); Point3D p3 = GetSummedPoint(initialPosition, new Point3D(0, 0, length)); Point3D p4 = GetSummedPoint(initialPosition, new Point3D(0, height, 0)); Point3D p5 = GetSummedPoint(initialPosition, new Point3D(width, height, 0)); Point3D p6 = GetSummedPoint(initialPosition, new Point3D(width, height, length)); Point3D p7 = GetSummedPoint(initialPosition, new Point3D(0, height, length)); //front side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p3, p2, p6, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p3, p6, p7, color)); //right side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p1, p5, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p5, p6, color)); //back side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p1, p0, p4, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p1, p4, p5, color)); //left side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p0, p3, p7, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p0, p7, p4, color)); //top side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p7, p6, p5, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p7, p5, p4, color)); //bottom side triangles group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p3, p0, color)); group.Children.Add(Triangle.CreateTriangleModelGroup(p2, p0, p1, color));
  • 33. 3D Rendering class Cuboid { public Cuboid(Viewport3D viewport3D, Point3D initialPosition, double length, double width, double height, Color color) { Model3D model = CreateModelGroup(initialPosition, length, width, height, color); ModelVisual3D visualModel = new ModelVisual3D(); visualModel.Content = model; viewport3D.Children.Add(visualModel); } private Model3D CreateModelGroup(Point3D initialPosition,double length, double width, double height, Color color) { Model3DGroup group = new Model3DGroup(); // *HERE* // return group; } public static Point3D GetSummedPoint(Point3D p1, Point3D p2) { Point3D myPoint = new Point3D(); // Manipulate Coordinates myPoint.X = p1.X + p2.X; myPoint.Y = p1.Y + p2.Y; myPoint.Z = p1.Z + p2.Z; return myPoint; } }
  • 34. 3D Rendering • Now just call and play! :D public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); CameraManagement cameraManagement = new CameraManagement(viewport3D); Cuboid myFirstCuboid = new Cuboid(viewport3D, new Point3D(0, 0, 0), 40, 40, 40, Colors.Red); } }
  • 36. 3D Rendering public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); CameraManagement cameraManagement = new CameraManagement(viewport3D); Cuboid myFirstCuboid = new Cuboid(viewport3D, new Point3D(0, 0, 0), 50, 60, 10, Colors.Red); } }
  • 40. Project “Track-Ball” Provided by the WPF team 3-D tools Visit: http://www.codeplex.com/3DTools/ <Window xmlns:tools="clr-namespace:_3DTools;assembly=3DTools"... > Then you can easily add the TrackballDecorator to your markup: <tools:TrackballDecorator> <Viewport3D> ... </Viewport3D> </tools:TrackballDecorator> Hit Testing
  • 49. Viewport2DVisual3D • What’s needed to show 2D components in 3D environment?!
  • 50. Viewport2DVisual3D • What’s needed to show 2D components in 3D environment?!
  • 51. Viewport2DVisual3D • What’s needed to show 2D components in 3D environment?!
  • 52. Viewport2DVisual3D private void CreateMeshGeometry(Point3D initialPoint) { double pointParam = 0.5; initialPoint.X = -initialPoint.X; initialPoint.Y = -initialPoint.Y; initialPoint.Z = -initialPoint.Z; MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions = new Point3DCollection { HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint), HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ), HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint), HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint) }; mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 }); mesh.TextureCoordinates = new PointCollection(new Point[] { new Point(0, 0), new Point(0, 1), new Point(1, 1), new Point(1, 0) }); this._viewport2DVisual3D.Geometry = mesh; var material = new DiffuseMaterial { Brush = Brushes.White }; Viewport2DVisual3D.SetIsVisualHostMaterial(material, true); this._viewport2DVisual3D.Material = material; }
  • 53. Viewport2DVisual3D private void CreateMeshGeometry(Point3D initialPoint) { double pointParam = 0.5; initialPoint.X = -initialPoint.X; initialPoint.Y = -initialPoint.Y; initialPoint.Z = -initialPoint.Z; MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions = new Point3DCollection { HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint), HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ), HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint), HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint) }; mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 }); mesh.TextureCoordinates = new PointCollection(new Point[] { new Point(0, 0), new Point(0, 1), new Point(1, 1), new Point(1, 0) }); this._viewport2DVisual3D.Geometry = mesh; var material = new DiffuseMaterial { Brush = Brushes.White }; Viewport2DVisual3D.SetIsVisualHostMaterial(material, true); this._viewport2DVisual3D.Material = material; }
  • 54. Viewport2DVisual3D private void CreateMeshGeometry(Point3D initialPoint) { double pointParam = 0.5; initialPoint.X = -initialPoint.X; initialPoint.Y = -initialPoint.Y; initialPoint.Z = -initialPoint.Z; MeshGeometry3D mesh = new MeshGeometry3D(); mesh.Positions = new Point3DCollection { HelperClass.GetSummedPoint(new Point3D(-pointParam, pointParam, 0),initialPoint), HelperClass.GetSummedPoint(new Point3D(-pointParam, -pointParam, 0),initialPoint ), HelperClass.GetSummedPoint(new Point3D(pointParam, -pointParam, 0), initialPoint), HelperClass.GetSummedPoint(new Point3D(pointParam, pointParam, 0),initialPoint) }; mesh.TriangleIndices = new Int32Collection(new int[] { 0, 1, 2, 0, 2, 3 }); mesh.TextureCoordinates = new PointCollection(new Point[] { new Point(0, 0), new Point(0, 1), new Point(1, 1), new Point(1, 0) }); this._viewport2DVisual3D.Geometry = mesh; var material = new DiffuseMaterial { Brush = Brushes.White }; Viewport2DVisual3D.SetIsVisualHostMaterial(material, true); this._viewport2DVisual3D.Material = material; }
  • 55. Viewport2DVisual3D • So how can we add 2D Components?!
  • 56. Viewport2DVisual3D • So how can we add 2D Components?! – So easy!
  • 57. Viewport2DVisual3D • So how can we add 2D Components?! – So easy! _viewport2DVisual3D.Visual = InitializeVisualArea(); private StackPanel InitializeVisualArea() { StackPanel stackPanel = new StackPanel(); TextBlock textBlock = new TextBlock(); textBlock.Text = "Name: " + StudentInfo.Name + Environment.NewLine + "ID: "+ StudentInfo.Id; Button button = new Button(); button.Content = "Rotate Me!"; button.Click += new RoutedEventHandler(button_Click); stackPanel.Children.Add(textBlock); stackPanel.Children.Add(button); return stackPanel; }
  • 58. Viewport2DVisual3D • So how can we add 2D Components?! – So easy! _viewport2DVisual3D.Visual = InitializeVisualArea(); private StackPanel InitializeVisualArea() { StackPanel stackPanel = new StackPanel(); TextBlock textBlock = new TextBlock(); textBlock.Text = "Name: " + StudentInfo.Name + Environment.NewLine + "ID: "+ StudentInfo.Id; Button button = new Button(); button.Content = "Rotate Me!"; button.Click += new RoutedEventHandler(button_Click); stackPanel.Children.Add(textBlock); stackPanel.Children.Add(button); return stackPanel; } public StudentInfo StudentInfo { get{return _studentInfo;} set{_studentInfo = value;} }
  • 61. Animating Viewport2DVisual3D! • Just a Rotation public static void CreateViewportConstantRotationAnimationAroundX(Viewport2DVisual3D viewport2DVisual3D) { // Create Animation Around X Axis var rotationAnimationAroundXAxis = new Rotation3DAnimation(); rotationAnimationAroundXAxis.From = new AxisAngleRotation3D { Angle = 0, Axis = new Vector3D(0, 1, 0) // Y Axis }; rotationAnimationAroundXAxis.To = new AxisAngleRotation3D { Angle = 20, Axis = new Vector3D(0, 1, 0) // Y Axis }; rotationAnimationAroundXAxis.Duration = new Duration(TimeSpan.FromSeconds(2)); rotationAnimationAroundXAxis.AutoReverse = true; rotationAnimationAroundXAxis.RepeatBehavior = RepeatBehavior.Forever; // Define Property to animate viewport2DVisual3D.Transform.BeginAnimation(RotateTransform3D.RotationProperty, rotationAnimationAroundXAxis); }
  • 63. Animating Viewport2DVisual3D public static void CreateViewportFlipAnimation(Viewport2DVisual3D viewport2DVisual3D, Point3D position) { // Create Animation Rotation3DAnimation FlipAnimation = new Rotation3DAnimation(); FlipAnimation.From = new AxisAngleRotation3D { Angle = 0, Axis = new Vector3D(1, 0, 0) // X Axis }; FlipAnimation.To = new AxisAngleRotation3D { Angle = 180, Axis = new Vector3D(1, 0, 0) // X Axis }; FlipAnimation.Duration = new Duration(TimeSpan.FromSeconds(1)); FlipAnimation.AutoReverse = true; // Define Property to animate RotateTransform3D rotateTransform3D = new RotateTransform3D(); rotateTransform3D.CenterZ = - position.Z; rotateTransform3D.BeginAnimation(RotateTransform3D.RotationProperty, FlipAnimation); viewport2DVisual3D.Transform = rotateTransform3D; }
  • 64. Animating Viewport2DVisual3D public static void CreateViewportFlipAnimation(Viewport2DVisual3D viewport2DVisual3D, Point3D position) { // Create Animation Rotation3DAnimation FlipAnimation = new Rotation3DAnimation(); FlipAnimation.From = new AxisAngleRotation3D { Angle = 0, Axis = new Vector3D(1, 0, 0) // X Axis }; FlipAnimation.To = new AxisAngleRotation3D { Angle = 180, Axis = new Vector3D(1, 0, 0) // X Axis }; FlipAnimation.Duration = new Duration(TimeSpan.FromSeconds(1)); FlipAnimation.AutoReverse = true; // Define Property to animate RotateTransform3D rotateTransform3D = new RotateTransform3D(); rotateTransform3D.CenterZ = - position.Z; rotateTransform3D.BeginAnimation(RotateTransform3D.RotationProperty, FlipAnimation); viewport2DVisual3D.Transform = rotateTransform3D; }
  • 66. Animating Camera! • Just a Point3DAnimation public static void MoveCameraDynamicallyWithUserInput(PerspectiveCamera camera, Point3D targettedPosition) { if (camera.Position!= targettedPosition) { Point3DAnimation animation = new Point3DAnimation(); animation.From = camera.Position; animation.To = targettedPosition; animation.Duration = new Duration(TimeSpan.FromSeconds(1.5)); camera.BeginAnimation(PerspectiveCamera.PositionProperty,animation); } }
  • 67. Now test it and see what you got!
  • 68. Happy end of course!
  • 69. I really had so much fun! Hope you are too!
  • 70. Take a Look on my other courses @ http://www.slideshare.net/ZGTRZGTR Available courses to the date of this slide: C# Starter, C# Advanced, WPF, C++.NET, XNA, OpenGL, Delphi