This method of the Direct3dRMMesh Class allocates space for a collection of vertices and faces and retrieves an identifier for the group.
public void addGroup(int vcnt, int fcnt, int vPerFace, int[] fdata, int[] retId);
vcnt | The number of vertices in the group. |
fcnt | The number of faces in the group. |
vPerFace | Number of vertices per face in the group, if all faces have the same vertex count. If the group contains faces with varying vertex counts, this parameter should be zero. |
fdata | The array variable containing face data.
If the vPerFace parameter specifies a value, this data is simply a list of indices into the group's vertex array. If vPerFace is zero, the vertex indices should be preceded by an integer giving the number of vertices in that face. For example, if vPerFace is zero and the group is made up of triangular and quadrilateral faces, the data might be in the following form: 3 index index index 4 index index index index 3 index index index ... |
retId | The array variable that receives a value identifying the group. |
A newly added group has the following default properties:
To set the positions of the vertices, use the setVertices method.