Microsoft DirectX 8.1 (Visual Basic) |
The BarGraph 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 on the sample window to display a shortcut menu. From this menu you can load new data from a .csv (comma-delimited) file. You can export a .csv file from Microsoft Excel or any spreadsheet program.
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.