Holomatix

Log In / Register


Purchase
Model.getMaterial()

Usage

myModel.getMaterial(surfaceName:String) : Material

Parameters

  • surfaceName The name of the surface whose material should be returned.

Returns

A material.

Description

Method; Returns the material which is assigned to the surface surfaceName. If no material has been assigned, or the surface does not exist, then undefined is returned.

The names of the surfaces of a model are copied directly from the triangle sets of the geometry on which the model is based.

Example

var powerMaterial = myModel.getMaterial("powerNewTriSet000");
 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.