Packages
 In this topic

*Constructors

*Fields

 

Packages   PreviousThis PackageNext
Package com.ms.directX   Previous This
Package
Next

 


Class D3dTriangle

public final class D3dTriangle
{
  // Fields
  public char flags;
  public char v1;
  public char v2;
  public char v3;

  // Constructors
  public D3dTriangle(int v1, int v2, int v3, short flags);
  public D3dTriangle(short v1, short v2, short v3, short flags);
}

A class that describes a base type for all triangles. The triangle is the main rendering primitive.

Constructors

D3dTriangle

public D3dTriangle(int v1, int v2, int v3, short flags);

Creates a D3dTriangle object with the members passed as ints and a short (flags) cast to chars.

ParameterDescription
v1 The v1 field cast as an int.
v2 The v2 field cast as an int.
v3 The v3 field cast as an int.
flags The flags field cast as a short.

D3dTriangle

public D3dTriangle(short v1, short v2, short v3, short flags);

Creates a D3dTriangle object with the members passed as shorts cast to chars.

ParameterDescription
v1 The v1 field cast as a short.
v2 The v2 field cast as a short.
v3 The v3 field cast as a short.
flags The flags field cast as a short.

Fields

flags
Flags describing which edges of the triangle to enable (this information is useful only in wireframe mode). This value can be a combination of the following edge and strip flags:
Edge Flags
D3DTRIFLAG_EDGEENABLE1
Edge defined by v1-v2.
D3DTRIFLAG_EDGEENABLE2
Edge defined by v2-v3.
D3DTRIFLAG_EDGEENABLE3
Edge defined by v3-v1.
D3DTRIFLAG_EDGEENABLETRIANGLE
All edges.
Strip and Fan Flags
D3DTRIFLAG_EVEN
The v1-v2 edge of the current triangle is adjacent to the v3-v1 edge of the previous triangle; that is, v1 is the previous v1, and v2 is the previous v3.
D3DTRIFLAG_ODD
The v1-v2 edge of the current triangle is adjacent to the v2-v3 edge of the previous triangle; that is, v1 is the previous v3, and v2 is the previous v2.
D3DTRIFLAG_START
Begin the strip or fan, loading all three vertices.
D3DTRIFLAG_STARTFLAT(len)
If this triangle is culled, also cull the specified number of subsequent triangles. This length must be greater than zero and less than 30.
v1
Vertex describing the triangle.
v2
Vertex describing the triangle.
v3
Vertex describing the triangle.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.