Microsoft DirectX 8.1 (Visual Basic)

D3DX8.CreateBox

Uses a left-handed coordinate system to create a mesh containing an axis-aligned box.

object.CreateBox( _ 
    D3DDevice As Direct3DDevice8, _ 
    Width As Single, _ 
    Height As Single, _ 
    Depth As Single, _ 
    RetAdjacency As D3DXBuffer)As D3DXMesh

Parts

object
Object expression that resolves to a D3DX8 object.
D3DDevice
A Direct3DDevice8 object, representing the device associated with the created box mesh.
Width
Width of the box, along the x-axis.
Height
Height of the box, along the y-axis.
Depth
Depth of the box, along the z-axis.
RetAdjacency
D3DXBuffer object. When the method returns, this parameter is filled with an array of three Long values per face that specify the three neighbors for each face in the mesh.

Return Values

.D3DXMesh object, representing the output box.

Error Codes

If the method fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DXERR_INVALIDCALL
E_OUTOFMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.