Material

Overview

Material is a class in Aspose.3D FOSS for .NET. Inherits from: A3DObject, INamedObject, IEnumerable<TextureSlot>.

Material defines the parameters necessary for visual appearance of geometry. Aspose.3D provides shading model for Lambert, Phong and PbrMaterial.

This class provides 10 methods for working with Material objects in .NET programs. Available methods include: A3DObject, FindProperty, GetEnumerator, GetProperty, GetTexture, Material, RemoveProperty, SetProperty, SetTexture, ToString. All public members are accessible to any .NET application after installing the Aspose.3D FOSS for .NET package. Properties: MapAmbient, MapDiffuse, MapEmissive, MapNormal, MapSpecular, Name, and 1 more.

Properties

NameTypeAccessDescription
MapSpecularstringReadGets the map specular.
MapDiffusestringReadGets the map diffuse.
MapEmissivestringReadGets the map emissive.
MapAmbientstringReadGets the map ambient.
MapNormalstringReadGets the map normal.
NamestringRead/WriteGets or sets the name.
PropertiesPropertyCollectionReadGets the properties.

Methods

SignatureDescription
Material()Initializes a new material with the specified name
Material(name: string)
GetTexture(slotName: string)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()Formats object to string.
GetEnumerator()Gets the enumerator to enumerate internal texture slots.
A3DObject()
RemoveProperty(property: Property)Removes a dynamic property.
GetProperty(property: string)Get the value of specified property
SetProperty(property: string, value: object?)Sets the value of specified property
FindProperty(propertyName: string)Finds the property. It can be a dynamic property (Created by CreateDynamicProperty/SetProperty) or native property(Identified by its name)

See Also