Wiki > TV3D65 Index > TVMesh
SetMaterial
DESCRIPTION
-Applies a new material to the mesh or to a group mesh.
DECLARATION
| VB.NET | SetMaterial(iMaterial As Integer , iGroup As Integer) |
| C++ | void SetMaterial(int iMaterial , int iGroup ) |
PARAMETERS
| NAME | OPTIONAL | DESCRIPTION |
| iMaterial | No | Material number to be used |
| iGroup | Yes | index of the Group on which the material will be applied. Use -1 or 0 to update the whole mesh. |
RETURN VALUE
| Null | Does not return a value. |
EXAMPLES
| Example | Mesh.SetMaterial(Globals.GetMat(”Default”),-1). |
TIPS
- Use the GetMat method(getmat), in the Global Class, to get a material by its name