LambertMaterial

Inheritance: java.lang.Object, com.aspose.threed.A3DObject, com.aspose.threed.Material

public class LambertMaterial extends Material

Matériau pour le modèle d’éclairage Lambert

Constructeurs

ConstructeurDescription
LambertMaterial()Initialise une nouvelle instance de la classe LambertMaterial.
LambertMaterial(String name)Initialise une nouvelle instance de la classe LambertMaterial.

Champs

ChampDescription
MAP_AMBIENTUtilisé dans setTexture pour assigner un mappage de texture ambiant.
MAP_DIFFUSEUtilisé dans setTexture pour assigner un mappage de texture diffus.
MAP_EMISSIVEUtilisé dans setTexture pour assigner un mappage de texture émissif.
MAP_NORMALUtilisé dans setTexture pour assigner un mappage de texture normal.
MAP_SPECULARUtilisé dans setTexture pour assigner un mappage de texture spéculaire.

Méthodes

MéthodeDescription
equals(Object arg0)
findProperty(String propertyName)Trouve la propriété.
getAmbientColor()Obtient la couleur ambiante
getClass()
getDiffuseColor()Obtient la couleur diffuse
getEmissiveColor()Obtient la couleur émissive
getName()Obtient le nom.
getProperties()Obtient la collection de toutes les propriétés.
getProperty(String property)Obtenir la valeur de la propriété spécifiée
getTexture(String slotName)Obtient la texture du slot spécifié, cela peut être le nom de la propriété du matériau ou le nom du paramètre du shader
getTransparency()Obtient le facteur de transparence.
getTransparentColor()Obtient la couleur transparente.
hashCode()
iterator()Obtient l’énumérateur pour parcourir les slots de texture internes.
notify()
notifyAll()
removeProperty(Property property)Supprime une propriété dynamique.
removeProperty(String property)Supprime la propriété spécifiée identifiée par son nom
setAmbientColor(Vector3 value)Définit la couleur ambiante
setDiffuseColor(Vector3 value)Définit la couleur diffuse
setEmissiveColor(Vector3 value)Définit la couleur émissive
setName(String value)Définit le nom.
setProperty(String property, Object value)Définit la valeur de la propriété spécifiée
setTexture(String slotName, TextureBase texture)Définit la texture au slot spécifié
setTransparency(double value)Définit le facteur de transparence.
setTransparentColor(Vector3 value)Définit la couleur transparente.
toString()Formate l’objet en chaîne
wait()
wait(long arg0)
wait(long arg0, int arg1)

LambertMaterial()

public LambertMaterial()

Initialise une nouvelle instance de la classe LambertMaterial.

LambertMaterial(String name)

public LambertMaterial(String name)

Initialise une nouvelle instance de la classe LambertMaterial.

Parameters:

ParamètreTypeDescription
nomjava.lang.StringNom

MAP_AMBIENT

public static final String MAP_AMBIENT

Utilisé dans setTexture pour assigner un mappage de texture ambiant.

MAP_DIFFUSE

public static final String MAP_DIFFUSE

Utilisé dans setTexture pour assigner un mappage de texture diffus.

MAP_EMISSIVE

public static final String MAP_EMISSIVE

Utilisé dans setTexture pour assigner un mappage de texture émissif.

MAP_NORMAL

public static final String MAP_NORMAL

Utilisé dans setTexture pour assigner un mappage de texture normal.

MAP_SPECULAR

public static final String MAP_SPECULAR

Utilisé dans setTexture pour assigner un mappage de texture spéculaire.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParamètreTypeDescription
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

Trouve la propriété. Elle peut être une propriété dynamique (Créée par CreateDynamicProperty/SetProperty) ou une propriété native (Identifiée par son nom)

Parameters:

ParamètreTypeDescription
propertyNamejava.lang.StringNom de la propriété.

Returns: Property - The property.

getAmbientColor()

public Vector3 getAmbientColor()

Obtient la couleur ambiante

Returns: Vector3 - the ambient color

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDiffuseColor()

public Vector3 getDiffuseColor()

Obtient la couleur diffuse

Returns: Vector3 - the diffuse color

getEmissiveColor()

public Vector3 getEmissiveColor()

Obtient la couleur émissive

Returns: Vector3 - the emissive color Example:

var mat = new LambertMaterial();
     mat.setEmissiveColor(new Vector3(1, 1, 1));

getName()

public String getName()

Obtient le nom.

Returns: java.lang.String - le nom.

getProperties()

public PropertyCollection getProperties()

Obtient la collection de toutes les propriétés.

Returns: PropertyCollection - the collection of all properties.

getProperty(String property)

public Object getProperty(String property)

Obtenir la valeur de la propriété spécifiée

Parameters:

ParamètreTypeDescription
propriétéjava.lang.StringNom de la propriété

Returns: java.lang.Object - La valeur de la propriété trouvée

getTexture(String slotName)

public TextureBase getTexture(String slotName)

Obtient la texture du slot spécifié, cela peut être le nom de la propriété du matériau ou le nom du paramètre du shader

Parameters:

ParamètreTypeDescription
slotNamejava.lang.StringNom du slot.

Returns: TextureBase - The texture. Example:

var mat = new LambertMaterial();
     var tex = new Texture();
     tex.setFileName("diffuse.png");
     mat.setTexture(Material.MAP_DIFFUSE, tex);
     tex = (Texture)mat.getTexture(Material.MAP_DIFFUSE);

getTransparency()

public double getTransparency()

Obtient le facteur de transparence. Le facteur doit être compris entre 0 (0 %, totalement opaque) et 1 (100 %, totalement transparent). Toute valeur de facteur invalide sera tronquée.

Returns: double - le facteur de transparence. Le facteur doit être compris entre 0 (0 %, totalement opaque) et 1 (100 %, totalement transparent). Toute valeur de facteur invalide sera tronquée.

getTransparentColor()

public Vector3 getTransparentColor()

Obtient la couleur transparente.

Returns: Vector3 - the transparent color.

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator<TextureSlot> iterator()

Obtient l’énumérateur pour parcourir les slots de texture internes.

Returns: java.util.Iterator<com.aspose.threed.TextureSlot>

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

removeProperty(Property property)

public boolean removeProperty(Property property)

Supprime une propriété dynamique.

Parameters:

ParamètreTypeDescription
propertyPropertyQuelle propriété supprimer

Returns: boolean - vrai si la propriété est supprimée avec succès

removeProperty(String property)

public boolean removeProperty(String property)

Supprime la propriété spécifiée identifiée par son nom

Parameters:

ParamètreTypeDescription
propriétéjava.lang.StringQuelle propriété supprimer

Returns: boolean - vrai si la propriété est supprimée avec succès

setAmbientColor(Vector3 value)

public void setAmbientColor(Vector3 value)

Définit la couleur ambiante

Parameters:

ParamètreTypeDescription
valueVector3Nouvelle valeur

setDiffuseColor(Vector3 value)

public void setDiffuseColor(Vector3 value)

Définit la couleur diffuse

Parameters:

ParamètreTypeDescription
valueVector3Nouvelle valeur

setEmissiveColor(Vector3 value)

public void setEmissiveColor(Vector3 value)

Définit la couleur émissive

Parameters:

ParamètreTypeDescription
valueVector3
var mat = new LambertMaterial();
     mat.setEmissiveColor(new Vector3(1, 1, 1));
``` |

### setName(String value) {#setName-java.lang.String-}

public void setName(String value)



Définit le nom.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| valeur | java.lang.String | Nouvelle valeur |

### setProperty(String property, Object value) {#setProperty-java.lang.String-java.lang.Object-}

public void setProperty(String property, Object value)



Définit la valeur de la propriété spécifiée

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| propriété | java.lang.String | Nom de la propriété |
| valeur | java.lang.Object | La valeur de la propriété |

### setTexture(String slotName, TextureBase texture) {#setTexture-java.lang.String-com.aspose.threed.TextureBase-}

public void setTexture(String slotName, TextureBase texture)



Définit la texture au slot spécifié

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| slotName | java.lang.String | Nom du slot. |
|  | texture | [TextureBase](../../com.aspose.threed/texturebase) | Texture. **Exemple:** |

var mat = new LambertMaterial(); var tex = new Texture(); tex.setFileName(“diffuse.png”); mat.setTexture(Material.MAP_NORMAL, tex);


### setTransparency(double value) {#setTransparency-double-}

public void setTransparency(double value)



Définit le facteur de transparence. Le facteur doit être compris entre 0 (0 %, totalement opaque) et 1 (100 %, totalement transparent). Toute valeur de facteur invalide sera tronquée.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| valeur | double | Nouvelle valeur |

### setTransparentColor(Vector3 value) {#setTransparentColor-com.aspose.threed.Vector3-}

public void setTransparentColor(Vector3 value)



Définit la couleur transparente.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | Nouvelle valeur |

### toString() {#toString--}

public String toString()



Formate l'objet en chaîne

**Returns:**
java.lang.String - Chaîne d'objet
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |