Generating 3D Scatter Plot using C# and DirectX

===============================================
Managed DirectX Application Wizard : "DirectX9Application6"
Project Overview
===============================================

The Managed DirectX Application Wizard has created this "DirectX9Application6" project for you as a starting point.

This file contains a summary of what you will find in each of the files that make up your project.

DirectX9Application6.csproj

This is the main project file for projects generated using the Managed DirectX Application Wizard. 

It contains information about the version of the product that generated the file, and information about the platforms, configurations, and project features selected with the Managed DirectX Application Wizard.

dinput.cs

This contains functionality for using Managed DirectInput.

d3dapp.cs
d3denumeration.cs
d3dfont.cs
d3dutil.cs
D3DSettingForm.cs
These files contain base classes for setting up and rendering to Managed Direct3D devices.

D3DMesh.cs

This file contains code to renders the scatter plot to a Managed Direct3D device.

audio.cs

This file contains code to playback wav and multimedia files.
========================================================================
Code File name: D3DMesh.cs

This code file is the file that the DirectX9 Appwizard generates when 
you select 'Teapot'on the Direct3D Option page. This file is modified 
to display the scatter plot instead of the teapot.

class name: GraphicsClass

Relevent code is in:

InitializeDeviceObjects() 
RestoreDeviceObjects()
Render()

========================================================================
Code File name: dinput.cs

This class handles keyboard state using Direct Input (Keyboard). The 
keyboard can be used to rotate the scatterplot around all X, Y and Z 
axis. Also can be used to translate the camera position.

class name: InputClass

Relevent code is in:

GetInputState()

The numeric keypad is used as the input device for the program.

to rotate the scatter plot use numeric keypad

rotate around X-Axis 8, 2 keys
rotate around Y-Axis 4, 6 keys
rotate around Z-Axis 9, 1 keys

to translate the camera position (panning) use [CTRL] + numeric keypad numerals.

rotate around X-Axis [CTRL] + 4, [CTRL] + 6 
rotate around Y-Axis [CTRL] + 8, [CTRL] + 2 
rotate around Z-Axis [CTRL] + 9, [CTRL] + 1 

========================================================================
Code File name: Sphere3D.cs

This is the 3D shape (a sphere) used to display the data points in the 
scatter plot. Most of the functionality of this app is contained in this 
class. As each data point in the scatter plot is generated a mesh is 
created and then the mesh vertices are translated to the position supplied 
in the constructor.

class name: Sphere3D

========================================================================
Code File name: Cube3D.cs

This class is functionally equivalent to the Sphere3D class. The difference 
is that the mesh is a cube instead of a sphere.

class name: Cube3D


Similar Articles