PbrSpecularMaterial
Inheritance: java.lang.Object, com.aspose.threed.A3DObject, com.aspose.threed.Material
public class PbrSpecularMaterial extends Material
Material for physically based rendering based on diffuse color/specular/glossiness
Constructors
Constructor | Description |
---|---|
PbrSpecularMaterial() | Constructor of the PbrSpecularMaterial |
Fields
Field | Description |
---|---|
MAP_AMBIENT | Used in setTexture to assign a ambient texture mapping. |
MAP_DIFFUSE | Used in setTexture to assign a diffuse texture mapping. |
MAP_EMISSIVE | Used in setTexture to assign a emissive texture mapping. |
MAP_NORMAL | Used in setTexture to assign a normal texture mapping. |
MAP_SPECULAR | Used in setTexture to assign a specular texture mapping. |
MAP_SPECULAR_GLOSSINESS | The texture map for specular glossiness |
Methods
Method | Description |
---|---|
equals(Object arg0) | |
findProperty(String propertyName) | Finds the property. |
getClass() | |
getDiffuse() | Gets the diffuse color of the material, default value is (1, 1, 1) |
getDiffuseTexture() | Gets the texture for diffuse |
getEmissiveColor() | Gets the emissive color, default value is (0, 0, 0) |
getEmissiveTexture() | Gets the texture for emissive |
getGlossinessFactor() | Gets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1] |
getName() | Gets the name. |
getNormalTexture() | Gets the texture of normal mapping |
getProperties() | Gets the collection of all properties. |
getProperty(String property) | Get the value of specified property |
getSpecular() | Gets the specular color of the material, default value is (1, 1, 1). |
getSpecularGlossinessTexture() | Gets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness. |
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. |
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 |
setDiffuse(Vector3 value) | Sets the diffuse color of the material, default value is (1, 1, 1) |
setDiffuseTexture(TextureBase value) | Sets the texture for diffuse |
setEmissiveColor(Vector3 value) | Sets the emissive color, default value is (0, 0, 0) |
setEmissiveTexture(TextureBase value) | Sets the texture for emissive |
setGlossinessFactor(double value) | Sets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1] |
setName(String value) | Sets the name. |
setNormalTexture(TextureBase value) | Sets the texture of normal mapping |
setProperty(String property, Object value) | Sets the value of specified property |
setSpecular(Vector3 value) | Sets the specular color of the material, default value is (1, 1, 1). |
setSpecularGlossinessTexture(TextureBase value) | Sets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness. |
setTexture(String slotName, TextureBase texture) | Sets the texture to specified slot |
setTransparency(double value) | Sets the transparency factor. |
toString() | Formats object to string |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
PbrSpecularMaterial()
public PbrSpecularMaterial()
Constructor of the PbrSpecularMaterial
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.
MAP_SPECULAR_GLOSSINESS
public static final String MAP_SPECULAR_GLOSSINESS
The texture map for specular glossiness
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | java.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:
Parameter | Type | Description |
---|---|---|
propertyName | java.lang.String | Property name. |
Returns: Property - The property.
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getDiffuse()
public Vector3 getDiffuse()
Gets the diffuse color of the material, default value is (1, 1, 1)
Returns: Vector3
getDiffuseTexture()
public TextureBase getDiffuseTexture()
Gets the texture for diffuse
Returns: TextureBase
getEmissiveColor()
public Vector3 getEmissiveColor()
Gets the emissive color, default value is (0, 0, 0)
Returns: Vector3
getEmissiveTexture()
public TextureBase getEmissiveTexture()
Gets the texture for emissive
Returns: TextureBase
getGlossinessFactor()
public double getGlossinessFactor()
Gets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1]
Returns: double
getName()
public String getName()
Gets the name.
Returns: java.lang.String
getNormalTexture()
public TextureBase getNormalTexture()
Gets the texture of normal mapping
Returns: TextureBase
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:
Parameter | Type | Description |
---|---|---|
property | java.lang.String | Property name |
Returns: java.lang.Object - The value of the found property
getSpecular()
public Vector3 getSpecular()
Gets the specular color of the material, default value is (1, 1, 1).
Returns: Vector3
getSpecularGlossinessTexture()
public TextureBase getSpecularGlossinessTexture()
Gets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness.
Returns: TextureBase
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:
Parameter | Type | Description |
---|---|---|
slotName | java.lang.String | Slot 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
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:
Parameter | Type | Description |
---|---|---|
property | Property | Which 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:
Parameter | Type | Description |
---|---|---|
property | java.lang.String |
Returns: boolean
setDiffuse(Vector3 value)
public void setDiffuse(Vector3 value)
Sets the diffuse color of the material, default value is (1, 1, 1)
Parameters:
Parameter | Type | Description |
---|---|---|
value | Vector3 | New value |
setDiffuseTexture(TextureBase value)
public void setDiffuseTexture(TextureBase value)
Sets the texture for diffuse
Parameters:
Parameter | Type | Description |
---|---|---|
value | TextureBase | New value |
setEmissiveColor(Vector3 value)
public void setEmissiveColor(Vector3 value)
Sets the emissive color, default value is (0, 0, 0)
Parameters:
Parameter | Type | Description |
---|---|---|
value | Vector3 | New value |
setEmissiveTexture(TextureBase value)
public void setEmissiveTexture(TextureBase value)
Sets the texture for emissive
Parameters:
Parameter | Type | Description |
---|---|---|
value | TextureBase | New value |
setGlossinessFactor(double value)
public void setGlossinessFactor(double value)
Sets the glossiness(smoothness) of the material, 1 means perfectly smooth and 0 means perfectly rough, default value is 1, range is [0, 1]
Parameters:
Parameter | Type | Description |
---|---|---|
value | double | New value |
setName(String value)
public void setName(String value)
Sets the name.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String | New value |
setNormalTexture(TextureBase value)
public void setNormalTexture(TextureBase value)
Sets the texture of normal mapping
Parameters:
Parameter | Type | Description |
---|---|---|
value | TextureBase | New value |
setProperty(String property, Object value)
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 |
setSpecular(Vector3 value)
public void setSpecular(Vector3 value)
Sets the specular color of the material, default value is (1, 1, 1).
Parameters:
Parameter | Type | Description |
---|---|---|
value | Vector3 | New value |
setSpecularGlossinessTexture(TextureBase value)
public void setSpecularGlossinessTexture(TextureBase value)
Sets the texture for specular color, channel RGB stores the specular color and channel A stores the glossiness.
Parameters:
Parameter | Type | Description |
---|---|---|
value | TextureBase | New value |
setTexture(String slotName, TextureBase texture)
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 | 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 |
### 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 | |