Microsoft DirectX 9.0 SDK Update (October 2004)

Mesh.Box Method

Language:

Note: This documentation is preliminary and is subject to change.

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

Definition

Visual Basic .NET 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
);
Managed C++ public: static Mesh* Box(
    Device *device,
    float width,
    float height,
    float depth
);
JScript .NET 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.
OutOfMemoryException Leave Site Microsoft® Direct3D® could not allocate sufficient memory to complete the call.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center