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.
material id as returned by [createNewMaterial](MaterialManagerInterface.html#createNewMaterial)).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).
true if the material has been changed.
geometric instance id of the geometric instance to change.material id as returned by [createNewMaterial](MaterialManagerInterface.html#createNewMaterial)).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).
true if the material has been changed.
geometric instance ids of the geometric instances to change.material id as returned by [createNewMaterial](MaterialManagerInterface.html#createNewMaterial)).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.
true if pDiffuse was modified, and therefore the material exists.
material id to query.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.
The current material id of the instance, -1 if the geometric instance id is invalid.
material id from.Gets the number of custom materials that may be created.
This value does not depend on the custom materials already created. Once the DMU is loaded, you can expect this value to be constant.
The number of custom materials that may be created.
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.
true if the list of material ids has been retrieved (thus pGeometricInstanceId is valid).
geometric instance id to retrieve the original material ids from.material ids of the given geometric instance id.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.
The current number of materials of the given geometric instance (at least 1), -1 if the given geometric instance id is invalid.
geometric instance id to retrieve the original material ids from.Tells if the material corresponding to the given material id is included in the DMU s original materials
(in opposition to custom materials).
true if the material id exists and is an original material.
material id to check.Modifies the color of a custom material, changing its rendering parameters.
It is NOT possible to edit original materials of the DMU.
true if the material was changed (i.e. the material id was correct and not an original material id).
material id of the material to edit.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.
true if the material has been restored (be it custom or not), false if the geometric instance id is invalid.
geometric instance id of the
geometric instance to restore.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.
true if the material has been restored, false if an invalid id is found in the geometric instance ids.
geometric instance ids of the geometric instances to restore.
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 getNbAvailableCustomMaterials. 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 getMaterialManager.
Please refer to the [InfiniteEngineInterface](InfiniteEngineInterface.html) for more information.
See
InfiniteEngineInterface