Share via


Mesh.Polygon Method

Uses a left-handed coordinate system to create a mesh that contains an n-sided polygon.

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

Syntax

'Declaration
Public Shared Function Polygon ( _
    device As Device, _
    length As Single, _
    sides As Integer _
) As Mesh
'Usage
Dim device As Device
Dim length As Single
Dim sides As Integer
Dim returnValue As Mesh

returnValue = Mesh.Polygon(device, length, sides)
public static Mesh Polygon (
    Device device,
    float length,
    int sides
)
public:
static Mesh^ Polygon (
    Device^ device, 
    float length, 
    int sides
)
public static Mesh Polygon (
    Device device, 
    float length, 
    int sides
)
public static function Polygon (
    device : Device, 
    length : float, 
    sides : int
) : Mesh
Not applicable.

Parameters

  • device
    A Device object that represents the device associated with the created polygon mesh.
  • length
    Length of each side.
  • sides
    Number of sides for the polygon; must be greater than or equal to 3.

Return Value

A Mesh object that represents the polygon mesh.

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 polygon 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