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)¶ -
Parameters: mode ( osg.Material.ColorMode
) –
-
:
getColorMode
()¶ -
Return type: osg.Material.ColorMode
-
:
setAmbient
(osg.Material.Face face, osg.Vec4 ambient)¶ -
Parameters: - face (
osg.Material.Face
) – - ambient (
osg.Vec4
) –
- face (
-
:
getAmbient
(osg.Material.Face face)¶ -
Parameters: face ( osg.Material.Face
) –Return type: osg.Vec4
-
:
getAmbientFrontAndBack
()¶ -
Return type: bool
-
:
setDiffuse
(osg.Material.Face face, osg.Vec4 diffuse)¶ -
Parameters: - face (
osg.Material.Face
) – - diffuse (
osg.Vec4
) –
- face (
-
:
getDiffuse
(osg.Material.Face face)¶ -
Parameters: face ( osg.Material.Face
) –Return type: osg.Vec4
-
:
getDiffuseFrontAndBack
()¶ -
Return type: 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 is0.0
to1.0
.Parameters: - face (
osg.Material.Face
) – - specular (
osg.Vec4
) –
- face (
-
:
getSpecular
(osg.Material.Face face)¶ Get the specular value for specified face.
Parameters: face ( osg.Material.Face
) –Return type: osg.Vec4
-
:
getSpecularFrontAndBack
()¶ Return whether specular values are equal for front and back faces or not.
Return type: 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 is0.0
Parameters: - face (
osg.Material.Face
) – - emission (
osg.Vec4
) –
- face (
-
:
getEmission
(osg.Material.Face face)¶ Get the emission value for specified face.
Parameters: face ( osg.Material.Face
) –Return type: osg.Vec4
-
:
getEmissionFrontAndBack
()¶ Return whether emission values are equal for front and back faces or not.
Return type: bool
-
:
setShininess
(osg.Material.Face face, double shininess)¶ Set shininess of specified face(s) of the
osg.Material
. Valid shininess range is0.0
to128.0
.Parameters: - face (
osg.Material.Face
) – - shininess (
double
) –
- face (
-
:
getShininess
(osg.Material.Face face)¶ Get the shininess value for specified face.
Parameters: face ( osg.Material.Face
) –Return type: double
-
:
getShininessFrontAndBack
()¶ Return whether shininess values are equal for front and back faces or not.
Return type: 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 is0.0
to1.0
.Parameters: - face (
osg.Material.Face
) – - transparency (
double
) –
- face (
-
:
setAlpha
(osg.Material.Face face, double alpha)¶ Set the alpha value of ambient, diffuse, specular and emission colors. Valid transparency range is
0.0
to1.0
.Parameters: - face (
osg.Material.Face
) – - alpha (
double
) –
- face (
-