Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mri.v3ds
Class FaceMat3ds

    java.lang.Object
      mri.v3ds.FaceMat3ds

    public class FaceMat3ds

extends java.lang.Object

Material selector for the faces in a mesh.
A single mesh (class `Mesh3ds`) usually consists of many faces (class `Face3ds`). The faces can have different materials. The `FaceMat3ds` class is used to assign a material to a set of faces. If the mesh uses several materials, the mesh have one `FaceMat3ds` object for each material.
The `FaceMat3ds` class consists of a material index which selects the material from the global material array in the `Scene3ds` class. It also contains an array of face indexes which specify which faces in the mesh face array, this material should be assigned to.
Assigning materials to faces in this way is very handly when rendering a mesh using a HW-accelerated 3D-engine. Using an 3D-accelerator, it is efficient to render as many faces as possible using the same material. Switching material is typically a slow process.

Constructor Summary
`FaceMat3ds()`

Method Summary
`int` | `face(int i)` Access a specific face index in the face index array.
`int[]` | `faceArray()` Access the whole array of face indexes.
`int` | `faces()` Get number of face indexes.
`int` | `material()` Get material number.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FaceMat3ds

    public FaceMat3ds()

Method Detail

### material

    public int material()

  Get material number. This is an index into global material array in the `Scene3ds` class.

  Returns:
    material number

### faces

    public int faces()

  Get number of face indexes.

  Returns:
    number of face indexes

### face

    public int face(int i)

  Access a specific face index in the face index array.

  Parameters:
    `i` - index into face index array [0 ... faces()-1]
  Returns:
    the specified face index

### faceArray

    public int[] faceArray()

  Access the whole array of face indexes.

  Returns:
    array of face indexes

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD