LambertMaterial

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

public class LambertMaterial extends Material

Material for lambert shading model

Constructors

ConstructorDescription
LambertMaterial()Initializes a new instance of the LambertMaterial class.
LambertMaterial(String name)Initializes a new instance of the LambertMaterial class.

Fields

FieldDescription
MAP_AMBIENTUsed in setTexture to assign a ambient texture mapping.
MAP_DIFFUSEUsed in setTexture to assign a diffuse texture mapping.
MAP_EMISSIVEUsed in setTexture to assign a emissive texture mapping.
MAP_NORMALUsed in setTexture to assign a normal texture mapping.
MAP_SPECULARUsed in setTexture to assign a specular texture mapping.

Methods

MethodDescription
equals(Object arg0)
findProperty(String propertyName)Finds the property.
getAmbientColor()Gets the ambient color
getClass()
getDiffuseColor()Gets the diffuse color
getEmissiveColor()Gets the emissive color Example:
getName()Gets the name.
getProperties()Gets the collection of all properties.
getProperty(String property)Get the value of specified property
getTexture(String slotName)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name
getTransparency()Gets the transparency factor.
getTransparentColor()Gets the transparent color.
hashCode()
iterator()Gets the enumerator to enumerate internal texture slots.
notify()
notifyAll()
removeProperty(Property property)Removes a dynamic property.
removeProperty(String property)Remove the specified property identified by name
setAmbientColor(Vector3 value)Sets the ambient color
setDiffuseColor(Vector3 value)Sets the diffuse color
setEmissiveColor(Vector3 value)Sets the emissive color
setName(String value)Sets the name.
setProperty(String property, Object value)Sets the value of specified property
setTexture(String slotName, TextureBase texture)Sets the texture to specified slot
setTransparency(double value)Sets the transparency factor.
setTransparentColor(Vector3 value)Sets the transparent color.
toString()Formats object to string
wait()
wait(long arg0)
wait(long arg0, int arg1)

LambertMaterial()

public LambertMaterial()

Initializes a new instance of the LambertMaterial class.

LambertMaterial(String name)

public LambertMaterial(String name)

Initializes a new instance of the LambertMaterial class.

Parameters:

ParameterTypeDescription
namejava.lang.StringName

MAP_AMBIENT

public static final String MAP_AMBIENT

Used in setTexture to assign a ambient texture mapping.

MAP_DIFFUSE

public static final String MAP_DIFFUSE

Used in setTexture to assign a diffuse texture mapping.

MAP_EMISSIVE

public static final String MAP_EMISSIVE

Used in setTexture to assign a emissive texture mapping.

MAP_NORMAL

public static final String MAP_NORMAL

Used in setTexture to assign a normal texture mapping.

MAP_SPECULAR

public static final String MAP_SPECULAR

Used in setTexture to assign a specular texture mapping.

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

findProperty(String propertyName)

public Property findProperty(String propertyName)

Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

Parameters:

ParameterTypeDescription
propertyNamejava.lang.StringProperty name.

Returns: Property - The property.

getAmbientColor()

public Vector3 getAmbientColor()

Gets the ambient color

Returns: Vector3

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDiffuseColor()

public Vector3 getDiffuseColor()

Gets the diffuse color

Returns: Vector3

getEmissiveColor()

public Vector3 getEmissiveColor()

Gets the emissive color Example:

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

Returns: Vector3

getName()

public String getName()

Gets the name.

Returns: java.lang.String

getProperties()

public PropertyCollection getProperties()

Gets the collection of all properties.

Returns: PropertyCollection

getProperty(String property)

public Object getProperty(String property)

Get the value of specified property

Parameters:

ParameterTypeDescription
propertyjava.lang.StringProperty name

Returns: java.lang.Object - The value of the found property

getTexture(String slotName)

public TextureBase getTexture(String slotName)

Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name

Parameters:

ParameterTypeDescription
slotNamejava.lang.StringSlot name.

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()

Gets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped.

Returns: double

getTransparentColor()

public Vector3 getTransparentColor()

Gets the transparent color.

Returns: Vector3

hashCode()

public native int hashCode()

Returns: int

iterator()

public Iterator<TextureSlot> iterator()

Gets the enumerator to enumerate internal texture slots.

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)

Removes a dynamic property.

Parameters:

ParameterTypeDescription
propertyPropertyWhich property to remove

Returns: boolean - true if the property is successfully removed

removeProperty(String property)

public boolean removeProperty(String property)

Remove the specified property identified by name

Parameters:

ParameterTypeDescription
propertyjava.lang.String

Returns: boolean

setAmbientColor(Vector3 value)

public void setAmbientColor(Vector3 value)

Sets the ambient color

Parameters:

ParameterTypeDescription
valueVector3New value

setDiffuseColor(Vector3 value)

public void setDiffuseColor(Vector3 value)

Sets the diffuse color

Parameters:

ParameterTypeDescription
valueVector3New value

setEmissiveColor(Vector3 value)

public void setEmissiveColor(Vector3 value)

Sets the emissive color

Parameters:

ParameterTypeDescription
valueVector3New value Example:
var mat = new LambertMaterial();
     mat.setEmissiveColor(new Vector3(1, 1, 1));
``` |

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

public void setName(String value)



Sets the name.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | New value |

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

public void setProperty(String property, Object value)



Sets the value of specified property

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| property | java.lang.String | Property name |
| value | java.lang.Object | The value of the property |

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

public void setTexture(String slotName, TextureBase texture)



Sets the texture to specified slot

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| slotName | java.lang.String | Slot name. |
| texture | [TextureBase](../../com.aspose.threed/texturebase) | Texture. **Example:**

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)



Sets the transparency factor. The factor should be ranged between 0(0%, fully opaque) and 1(100%, fully transparent) Any invalid factor value will be clamped.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | double | New value |

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

public void setTransparentColor(Vector3 value)



Sets the transparent color.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [Vector3](../../com.aspose.threed/vector3) | New value |

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

public String toString()



Formats object to string

**Returns:**
java.lang.String - Object string
### wait() {#wait--}

public final void wait()





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

public final void wait(long arg0)





**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

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

public final void wait(long arg0, int arg1)





**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |