| Microsoft DirectX 8.1 (Visual Basic) |
object.CreateTorus( _
D3DDevice As Direct3DDevice8, _
InnerRadius As Single, _
OuterRadius As Single, _
Sides As Long, _
Rings As Long, _
RetAdjacency As D3DXBuffer) As D3DXMesh
D3DXMesh object representing the created torus.
If the method fails, an error is raised and Err.Number can be set to one of the following values.
| D3DERR_INVALIDCALL |
| D3DXERR_INVALIDDATA |
| E_OUTOFMEMORY |
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
The CreateTorus method draws a doughnut, centered at (0, 0, 0) whose axis is aligned with the z-axis. The inner-radius of the torus is the radius of the cross-section (the minor-radius), and the outer-radius of the torus is the radius of the central hole.
This method returns a mesh that can be used later for drawing or manipulation by the application.