DirectX SDK |
The D3DXCreateTorus function creates a torus of given dimensions.
HRESULT D3DXCreateTorus( LPDIRECT3DDEVICE7 pDevice, float innerRadius, float outerRadius, DWORD numSides, DWORD numRings, DWORD numTexCoords, ID3DXSimpleShape** ppShape );
If the function succeeds, the return value is S_OK.
If the function fails, the return value may be one of the following values:
The D3DXCreateTorus 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 function returns a vertex buffer that can be used later for drawing or manipulation by the application.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Version: Requires DirectX 7.0.
Header: Declared in d3dxshapes.h.
Library: Use d3dx.lib.
D3DXCreateBox, D3DXCreateCylinder, D3DXCreatePolygon, D3DXCreateSphere, D3DXCreateTeapot