Changes the material of all geometric instances to a given custom material.
Returns false if the material does not exist, is not a custom one. The custom material must have been created before being used (see createNewMaterial).
true if the material has been changed.
Changes the material of the given geometric instance to a given custom material.
Returns false if the material does not exist , is not a custom one or if the geometric instance id is invalid.
The custom material must have been created before being used (see createNewMaterial).
geometric instance id of the geometric instance to change.true if the material has been changed.
Changes the material of the given geometric instances to a given custom material.
Returns false if the material does not exist, is not a custom one or if any geometric instance id is invalid.
The custom material must have been created before being used (see createNewMaterial).
geometric instance ids of the geometric instances to change.true if the material has been changed.
Creates a new custom material of the given color.
The id of the new material, or -1 if the material could not be created (i.e. the limit of materials has been reached).
Gets the diffuse color of the material.
material id to query.true if pDiffuse was modified, and therefore the material exists.
Gets the current material applied to the given instance, returns -1 if the geometric instance id is invalid.
The returned value can refer either to a custom material id or an original material id.
In case of an original material (see isOriginalMaterial), the id corresponds to the first id of
getOriginalMaterialsOfInstance. Indeed, in case of a multi-material geometry, a single geometric instance may have
multiple original materials.
material id from.The current material id of the instance, -1 if the geometric instance id is invalid.
Retrieves all original material ids of the given geometric instance, even if a custom material
has been applied to the geometric instance.
This method is recommended when it is certain that the material of the given instance has not been overridden, else prefer getMaterialOfInstance.
geometric instance id to retrieve the original material ids from.material ids of the given geometric instance id.true if the list of material ids has been retrieved (thus pGeometricInstanceId is valid).
Gets the number of original materials of the given instance, even if a custom material has been applied to the geometric instance.
Any geometric instance can have multiple original materials.
geometric instance id to retrieve the original material ids from.The current number of materials of the given geometric instance (at least 1), -1 if the given geometric instance id is invalid.
Tells if the material corresponding to the given material id is included in the DMU s original materials
(in opposition to custom materials).
material id to check.true if the material id exists and is an original material.
Modifies the color of a custom material, changing its rendering parameters.
It is NOT possible to edit original materials of the DMU.
material id of the material to edit.true if the material was changed (i.e. the material id was correct and not an original material id).
Restores the geometric instance to its original color.
Restoring a material of a geometric instance that still has its original material is legal and therefore returns true.
geometric instance id of the
geometric instance to restore.true if the material has been restored (be it custom or not), false if the geometric instance id is invalid.
Restores the geometric instances to their original colors.
Restoring a material of a geometric instance that still has its original material is legal.
All geometric instance ids must be valid in order to success.
geometric instance ids of the geometric instances to restore.true if the material has been restored, false if an invalid id is found in the geometric instance ids.
The MaterialManagerInterface interface allows the coloring of the DMU.
This interface is used to create and set materials for
geometric instancesfrom theirgeometric instance ids. All materials are accessed by theirmaterial id, there is no specific "material objects" to handle.WARNING : there is a fixed limit for the total number of different materials that may be in use.
Original materials refer to the materials loaded from the DMU and custom materials refer to the API created materials. Depending on the number of original materials of the DMU, there may be a different number of custom materials that may be created. The number of custom materials that may be created is given by getAvailableCustomMaterialsCount. Only custom materials can be created, modified or removed; original materials of the DMU can only be queried but not modified.
A single
geometric instancemay have multiple original materials, in case of a multi material geometry. For these geometries, it is NOT possible to change the coloring of each individual sub-geometry. In case of a custom material application, the whole geometry color will be changed.The MaterialManagerInterface is a member of the InfiniteEngineInterface, accessed through InfiniteEngineInterface.getMaterialManager.
Please refer to the InfiniteEngineInterface for more information.
See
InfiniteEngineInterface