Class Index | File Index

Classes


Class HomeMaterial


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
Method Summary
Method Attributes Method Name and Description
 
equals(object)
Returns true if this material is equal to object.
 
Returns the color of this material.
 
Returns the key of this material.
 
Returns the name of this material.
 
Returns the shininess of this material.
 
Returns the texture of this material.
 
Returns a hash code for this material.
Class Detail
HomeMaterial(name, key, color, texture, shininess)
Creates a material instance from parameters.
Author: Emmanuel Puybaret.
Parameters:
{string} name
{string} key
{number} color
{HomeTexture} texture
{number} shininess
Method Detail
{boolean} equals(object)
Returns true if this material is equal to object.
Parameters:
{Object} object
Returns:
{boolean}

{number} getColor()
Returns the color of this material.
Returns:
{number} the color of the material as RGB code or null if material color is unchanged.

{string} getKey()
Returns the key of this material. If not null, this key should be used as the unique identifier to find this material among the ones available on a model, rather than the name of this material.
Returns:
{string} the key of the material or null if material has no key.

{string} getName()
Returns the name of this material.
Returns:
{string} the name of the material or null if material has no name.

{number} getShininess()
Returns the shininess of this material.
Returns:
{number} a value between 0 (matt) and 1 (very shiny) or null if material shininess is unchanged.

{HomeTexture} getTexture()
Returns the texture of this material.
Returns:
{HomeTexture} the texture of the material or null if material texture is unchanged.

{number} hashCode()
Returns a hash code for this material.
Returns:
{number}

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:26 GMT+0200 (CEST)