Microsoft DirectX 8.1 (Visual Basic) |
The ScatterGraph sample describes how you can use Microsoft® Direct3D® for graphic visualization. It uses the RenderToSurface features of the Microsoft® Direct3DX framework to render text and bitmaps dynamically.
Source: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\AnimKeys
Executable: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Bin
Right-click the sample's interface to display a shortcut menu. The following table list the available menu commands.
Command | Action |
---|---|
Load Data From File | Loads new data from a .csv (comma-delimited) file. A .csv file can be exported from Microsoft Excel or any spreadsheet program. |
Reset Orientation | Resets the viewpoint to a known state. |
Show Connecting Lines | Connects the data points if the order of the data is important. |
Show Height Lines | Makes it easier to see the y-value in comparison to the other values. |
Show Foot Lines | Makes it easier to see the x-z relationship. |
Show Base Plane | Shows the plane where y=0. |
Auto Rotate | Turns rotation on and off. |
The file must be formatted so that the first row and columns are headers that title the data. A header can contain the tag TEXTURE:filename.bmp to indicate that it contains a picture. The rest of the data must be numeric. See Bargraphdata.csv in (SDK root)\Samples\Multimedia\VBSamples\Media for an example.
Holding the mouse button and dragging rotates the graph.
The following table lists the keys that are implemented.
Key | Action |
---|---|
RIGHT ARROW | Moves the camera right. |
LEFT ARROW | Moves the camera left. |
UP ARROW | Moves the camera up. |
DOWN ARROW | Moves the camera down. |
W | Moves the camera forward. |
S | Moves the camera backward. |
E | Rotates the camera right. |
Q | Rotates the camera left. |
A | Rotates the camera up. |
Z | Rotates the camera down. |
This sample uses common Microsoft DirectX® code that consists of programming elements such as helper functions. This code is shared with other samples on the DirectX SDK. You can find the common source code in (SDK root)\Samples\Multimedia\VBSamples.