Share via


Mesh.Box Method

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

Namespace: Microsoft.WindowsMobile.DirectX.Direct3D
Assembly: Microsoft.WindowsMobile.DirectX (in microsoft.windowsmobile.directx.dll)

Syntax

'Declaration
Public Shared Function Box ( _
    device As Device, _
    width As Single, _
    height As Single, _
    depth As Single _
) As Mesh
'Usage
Dim device As Device
Dim width As Single
Dim height As Single
Dim depth As Single
Dim returnValue As Mesh

returnValue = Mesh.Box(device, width, height, depth)
public static Mesh Box (
    Device device,
    float width,
    float height,
    float depth
)
public:
static Mesh^ Box (
    Device^ device, 
    float width, 
    float height, 
    float depth
)
public static Mesh Box (
    Device device, 
    float width, 
    float height, 
    float depth
)
public static function Box (
    device : Device, 
    width : float, 
    height : float, 
    depth : float
) : Mesh
Not applicable.

Parameters

  • 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.

Return Value

A Mesh object that contains the box.

Exceptions

Exception type Condition

InvalidCallException

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

OutOfMemoryException

Direct3D could not allocate sufficient memory to complete the call.

Remarks

The created box is centered at the origin.

Platforms

Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

Version Information

.NET Compact Framework

Supported in: 2.0

See Also

Reference

Mesh Class
Mesh Members
Microsoft.WindowsMobile.DirectX.Direct3D Namespace