Share via


Mesh.Box(Device,Single,Single,Single) Method (Microsoft.DirectX.Direct3D)

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

Definition

Visual Basic Public Shared Function Box( _
    ByVal device As Device, _
    ByVal width As Single, _
    ByVal height As Single, _
    ByVal depth As Single _
) As Mesh
C# public static Mesh Box(
    Device device,
    float width,
    float height,
    float depth
);
C++ public:
static MeshBox(
    Devicedevice,
    float width,
    float height,
    float depth
);
JScript public static function Box(
    device : Device,
    width : float,
    height : float,
    depth : float
) : Mesh;

Parameters

device Microsoft.DirectX.Direct3D.Device
A Device object.
width System.Single
Width of the box along the x-axis.
height System.Single
Height of the box along the y-axis.
depth System.Single
Depth of the box along the z-axis.

Return Value

Microsoft.DirectX.Direct3D.Mesh
A Mesh object that contains the box.

Remarks

The created box is centered at the origin.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

InvalidDataException

The data is invalid.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.

See Also