osg.Material

class osg.Material
Represents:c++ class
Wraps:osg::Material
Bases:osg.StateAttribute

Material - encapsulates OpenGL glMaterial state (https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glMaterial.xml).

Constructors:

osg.Material()

Methods:

:setColorMode(osg.Material.ColorMode mode)

Параметры:mode (osg.Material.ColorMode) –
:getColorMode()

Тип результата:osg.Material.ColorMode
:setAmbient(osg.Material.Face face, osg.Vec4 ambient)

Параметры:
:getAmbient(osg.Material.Face face)

Параметры:face (osg.Material.Face) –
Тип результата:osg.Vec4
:getAmbientFrontAndBack()

Тип результата:bool
:setDiffuse(osg.Material.Face face, osg.Vec4 diffuse)

Параметры:
:getDiffuse(osg.Material.Face face)

Параметры:face (osg.Material.Face) –
Тип результата:osg.Vec4
:getDiffuseFrontAndBack()

Тип результата:bool
:setSpecular(osg.Material.Face face, osg.Vec4 specular)

Set specular value of specified face(s) of the osg.Material, valid specular[0..3] range is 0.0 to 1.0.

Параметры:
:getSpecular(osg.Material.Face face)

Get the specular value for specified face.

Параметры:face (osg.Material.Face) –
Тип результата:osg.Vec4
:getSpecularFrontAndBack()

Return whether specular values are equal for front and back faces or not.

Тип результата:bool
:setEmission(osg.Material.Face face, osg.Vec4 emission)

Set emission value of specified face(s) of the osg.Material, valid emission[0..3] range is 0.0

Параметры:
:getEmission(osg.Material.Face face)

Get the emission value for specified face.

Параметры:face (osg.Material.Face) –
Тип результата:osg.Vec4
:getEmissionFrontAndBack()

Return whether emission values are equal for front and back faces or not.

Тип результата:bool
:setShininess(osg.Material.Face face, double shininess)

Set shininess of specified face(s) of the osg.Material. Valid shininess range is 0.0 to 128.0.

Параметры:
:getShininess(osg.Material.Face face)

Get the shininess value for specified face.

Параметры:face (osg.Material.Face) –
Тип результата:double
:getShininessFrontAndBack()

Return whether shininess values are equal for front and back faces or not.

Тип результата:bool
:setTransparency(osg.Material.Face face, double transparency)

Set the alpha value of ambient, diffuse, specular and emission colors of specified face, to 1-transparency. Valid transparency range is 0.0 to 1.0.

Параметры:
:setAlpha(osg.Material.Face face, double alpha)

Set the alpha value of ambient, diffuse, specular and emission colors. Valid transparency range is 0.0 to 1.0.

Параметры: