Share via


Mesh.Box(Device,Single,Single,Single,GraphicsStream) 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, _
    ByRef adjacency As GraphicsStream _
) As Mesh
C# public static Mesh Box(
    Device device,
    float width,
    float height,
    float depth,
    out GraphicsStream adjacency
);
C++ public:
static MeshBox(
    Devicedevice,
    float width,
    float height,
    float depth,
    [Out] GraphicsStream^% adjacency
);
JScript public static function Box(
    device : Device,
    width : float,
    height : float,
    depth : float,
    adjacency : GraphicsStream
) : 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.
adjacency Microsoft.DirectX.GraphicsStream
A GraphicsStream object. When the method returns, this parameter is filled with three Int32Leave Site values per face that specify the three neighbors for each face in the mesh.

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