Microsoft DirectX 8.1 (Visual Basic) |
The SkinnedMesh sample illustrates how to use the Microsoft® Direct3D® framework to load an .x file with skinning and animation information in it.
Source: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\SkinnedMesh
Executable: (SDK root)\Samples\Multimedia\VBSamples\Direct3D\Bin
The following table lists the keys that are implemented.
Key | Action |
---|---|
F2 | Prompts you to select a new rendering device or display mode. |
ALT+ENTER | Toggles between full-screen and windowed modes. |
ESC | Exits the application. |
The last argument passed to D3DUtil_LoadFromFileAsSkin is a CD3DAnimation class that is the parent to any animations that are found in the .x file.
Animation.SetTime must be called but does not pose the model.
Character.UpdateFrames computes the matrices for all joints on the character.
Character.RenderSkin renders the character using the loaded skin.
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.
The modeling exporters in the Extras directory of the DirectX SDK can export to .x files with skinning information.