Class Material

Definition

Namespace:
Tizen.NUI.Scene3D
Assembly:
Tizen.NUI.Scene3D.dll

Class for setting Material properties of 3D models.

C#
Copy
public class Material : BaseHandle, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable
Inheritance
Implements
Remarks

This Material class is for setting Material properties of 3D models. This Material supports properties and textures for PBR. Also, Material can be shared with multiple ModelPrimitives and if the value is modified, the rendering results of all ModelPrimitives using this Material will be changed.

Examples
Copy
Material material = new Material(); ModelPrimitive modelPrimitive = new ModelPrimitive(); modelPrimitive.Material = material;

Constructors

View Source

Material()

Create an initialized Material.

Declaration
C#
Copy
public Material()
View Source

Material(Material)

Copy constructor.

Declaration
C#
Copy
public Material(Material material)
Parameters
Type Name Description
Material material

Source object to copy.

Properties

View Source

AlphaCutoff

Property for the alpha cutoff value of the material.

Declaration
C#
Copy
public float AlphaCutoff { get; set; }
Property Value
Type Description
Single
View Source

AlphaMode

Property for the alpha blending mode of the material.

Declaration
C#
Copy
public MaterialAlphaModeType AlphaMode { get; set; }
Property Value
Type Description
MaterialAlphaModeType
View Source

BaseColorFactor

Property for the base color factor of the material.

Declaration
C#
Copy
public Vector4 BaseColorFactor { get; set; }
Property Value
Type Description
Vector4
Remarks

This factor is multiplied with the base color of the material.

View Source

BaseColorUrl

Property for the URL of the base color texture.

Declaration
C#
Copy
public string BaseColorUrl { get; set; }
Property Value
Type Description
String
Remarks

This texture represents the base color of the material.

View Source

DoubleSided

Property for the double sided material flag.

Declaration
C#
Copy
public bool DoubleSided { get; set; }
Property Value
Type Description
Boolean
View Source

EmissiveFactor

Property for the emissive factor of the material.

Declaration
C#
Copy
public Vector3 EmissiveFactor { get; set; }
Property Value
Type Description
Vector3
View Source

EmissiveUrl

Property for the URL of the emissive texture.

Declaration
C#
Copy
public string EmissiveUrl { get; set; }
Property Value
Type Description
String
View Source

Ior

Property for the index of refraction of the material.

Declaration
C#
Copy
public float Ior { get; set; }
Property Value
Type Description
Single
View Source

MetallicFactor

Property for the metallic factor of the material.

Declaration
C#
Copy
public float MetallicFactor { get; set; }
Property Value
Type Description
Single
Remarks

This factor is multiplied with the metallicness of the material.

View Source

MetallicRoughnessUrl

Property for the URL of the metallic roughness texture.

Declaration
C#
Copy
public string MetallicRoughnessUrl { get; set; }
Property Value
Type Description
String
Remarks

This texture represents the metallicness and roughness of the material.

View Source

Name

The name of the Material.

Declaration
C#
Copy
public string Name { get; set; }
Property Value
Type Description
String
Remarks

This Name property is for setting the name of Material. The name can be used to identify the Material.

View Source

NormalScale

Property for the scale of the normal texture.

Declaration
C#
Copy
public float NormalScale { get; set; }
Property Value
Type Description
Single
View Source

NormalUrl

Property for the URL of the normal texture.

Declaration
C#
Copy
public string NormalUrl { get; set; }
Property Value
Type Description
String
View Source

OcclusionStrength

Property for the strength of the occlusion texture.

Declaration
C#
Copy
public float OcclusionStrength { get; set; }
Property Value
Type Description
Single
View Source

OcclusionUrl

Property for the URL of the occlusion texture.

Declaration
C#
Copy
public string OcclusionUrl { get; set; }
Property Value
Type Description
String
View Source

RoughnessFactor

Property for the roughness factor of the material.

Declaration
C#
Copy
public float RoughnessFactor { get; set; }
Property Value
Type Description
Single
Remarks

This factor is multiplied with the roughness of the material.

View Source

SpecularColorFactor

Property for the specular color factor of the material.

Declaration
C#
Copy
public Vector3 SpecularColorFactor { get; set; }
Property Value
Type Description
Vector3
View Source

SpecularColorUrl

Property for the URL of the specular color texture.

Declaration
C#
Copy
public string SpecularColorUrl { get; set; }
Property Value
Type Description
String
View Source

SpecularFactor

Property for the specular factor of the material.

Declaration
C#
Copy
public float SpecularFactor { get; set; }
Property Value
Type Description
Single
View Source

SpecularUrl

Property for the URL of the specular texture.

Declaration
C#
Copy
public string SpecularUrl { get; set; }
Property Value
Type Description
String

Methods

View Source

GetSampler(MaterialTextureType)

Gets the sampler of the ModelNode object for the specified texture type.

Declaration
C#
Copy
public Sampler GetSampler(MaterialTextureType textureType)
Parameters
Type Name Description
MaterialTextureType textureType

The TextureType of the sampler to get.

Returns
Type Description
Sampler

The Sampler object of the ModelNode object for the specified texture type.

View Source

GetTexture(MaterialTextureType)

Gets the texture of the ModelNode object for the specified texture type.

Declaration
C#
Copy
public Texture GetTexture(MaterialTextureType textureType)
Parameters
Type Name Description
MaterialTextureType textureType

The TextureType of the texture to get.

Returns
Type Description
Texture

The Texture object of the ModelNode object for the specified texture type.

View Source

ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef)

Release swigCPtr.

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
System.Runtime.InteropServices.HandleRef swigCPtr
View Source

SetSampler(MaterialTextureType, Sampler)

Sets the sampler of the ModelNode object for the specified texture type.

Declaration
C#
Copy
public void SetSampler(MaterialTextureType textureType, Sampler sampler)
Parameters
Type Name Description
MaterialTextureType textureType

The TextureType of the sampler to set.

Sampler sampler

The Sampler object to set.

View Source

SetTexture(MaterialTextureType, Texture)

Sets the texture of the ModelNode object for the specified texture type.

Declaration
C#
Copy
public void SetTexture(MaterialTextureType textureType, Texture texture)
Parameters
Type Name Description
MaterialTextureType textureType

The TextureType of the texture to set.

Texture texture

The Texture object to set.

Implements

Extension Methods