Material

Material class

Material defines the parameters necessary for visual appearance of geometry. Aspose.3D provides shading model for LambertMaterial, PhongMaterial and ShaderMaterial @hideconstructor

Properties

NameDescription
MAP_SPECULARUsed in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a specular texture mapping.
MAP_DIFFUSEUsed in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a diffuse texture mapping.
MAP_EMISSIVEUsed in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a emissive texture mapping.
MAP_AMBIENTUsed in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a ambient texture mapping.
MAP_NORMALUsed in setTexture(java.lang.String, com.aspose.threed.TextureBase) to assign a normal texture mapping.

Methods

getName

NameDescription
getName()Gets or sets the name. The name.

Result:


setName

NameDescription
setName(value)Gets or sets the name. The name.

Result:


getProperties

NameDescription
getProperties()Gets the collection of all properties.

Result:


getTexture

NameDescription
getTexture(slotName)Gets the texture from the specified slot, it can be material’s property name or shader’s parameter name

Parameters:

NameTypeDescription
slotNameStringSlot name.

Result: TextureBase


setTexture

NameDescription
setTexture(slotName, texture)Sets the texture to specified slot

Parameters:

NameTypeDescription
slotNameStringSlot name.
textureTextureBaseTexture.

Result: TextureBase


toString

NameDescription
toString()Formats object to string

Result: String


removeProperty

NameDescription
removeProperty(property)Removes a dynamic property.

Parameters:

NameTypeDescription
propertyPropertyWhich property to remove

Result: boolean


removeProperty

NameDescription
removeProperty(property)Remove the specified property identified by name

Parameters:

NameTypeDescription
propertStringnull

Result: boolean


getProperty

NameDescription
getProperty(property)Get the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name

Result: Object


setProperty

NameDescription
setProperty(property, value)Sets the value of specified property

Parameters:

NameTypeDescription
propertyStringProperty name
valueObjectThe value of the property

Result: Object


findProperty

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

Parameters:

NameTypeDescription
propertyNameStringProperty name.

Result: Property


iterator

NameDescription
iterator()Reserved for internal use.

Result: Property