Microsoft SDK for Java

addFaces

This method of the Direct3dRMMeshBuilder Class adds a face to the Direct3dRMMeshBuilder object. This method is very similar to addFaces(int, float[], int, float[], int[]) except that it uses D3dVector array objects instead of simple float arrays.

Syntax

public void addFaces(int vCount, D3dVector[] v, int nCount, D3dVector[] n,

        int[] cones);

Parameters

vCount The number of vertices to use to create the face.
v An array of vectors that contains the vertices to use to create the face.
nCount The number of normals to use to create the face. If nCount is 0, the data is formatted as follows:
3, 1, 2, 3 //(v[1], v[2], and v[3] make this triangle)
3, 1, 2, 5 //(v[1], v[2], and v[5] make this triangle)
4, 7, 4, 0, 1 //(v[7], v[4], 4[0], and v[1] make this quadrilateral)

However, if nCount is not 0, then the data is as follows:

3, 1, 1, 2, 2, 3, 3 // normals are interlaced.
3, 1, 1, 2, 2, 5, 5
4, 7, 7, 4, 4, 0, 0, 1, 1
n An array of vectors that contains the normals used to create the face.
cones Array variable that contains the data associated with the face.

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