Material
Overview
Material is a class in Aspose.3D FOSS for Java.
Inherits from: A3DObject, Iterable<TextureSlot>.
Material defines the parameters necessary for visual appearance of geometry.
This class provides 11 methods for working with Material objects in Java programs.
Available methods include: findProperty, getName, getProperties, getProperty, getTexture, iterator, removeProperty, setName, setProperty, setTexture, toString.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: MAP_AMBIENT, MAP_DIFFUSE, MAP_EMISSIVE, MAP_NORMAL, MAP_SPECULAR, name, and 1 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
MAP_SPECULAR | String | Read | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a specular texture mapping. |
MAP_DIFFUSE | String | Read | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a diffuse texture mapping. |
MAP_EMISSIVE | String | Read | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a emissive texture mapping. |
MAP_AMBIENT | String | Read | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a ambient texture mapping. |
MAP_NORMAL | String | Read | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a normal texture mapping. |
name | String | Read | Gets the name. |
properties | PropertyCollection | Read | Gets the properties. |
Methods
| Signature | Description |
|---|---|
getTexture(slotName: String) → TextureBase | Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name. |
setTexture(slotName: String, texture: TextureBase) | Sets the texture to specified slot. |
toString() → String | Formats object to string. |
iterator() → Iterator<TextureSlot> | Gets the enumerator to enumerate internal texture slots. |
getName() → String | Returns the name. |
setName(name: String) | Sets the name value. |
getProperties() → PropertyCollection | Returns the properties. |
findProperty(name: String) → Property | Calls findProperty(name) on this Material instance. |
getProperty(name: String) → Object | Calls getProperty(name) on this Material instance. |
setProperty(name: String, value: Object) | Used in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a normal texture mapping. |
removeProperty(name: String) → boolean | Calls removeProperty(name) on this Material instance. |