Python Script Engine  8.3
GL Studio Editor Python Script API
Material Class Reference

Public Types

enum  ColorMaterialMode_e {
  NO_COLOR_MATERIAL ,
  DIFFUSE_COLOR_MATERIAL ,
  AMBIENT_COLOR_MATERIAL ,
  DIFFUSE_AND_AMBIENT_COLOR_MATERIAL ,
  EMISSION_COLOR_MATERIAL ,
  SPECULAR_COLOR_MATERIAL
}
 

Public Member Functions

 Material ()
 
 Material (Material &src)
 
 Material (str name, GlsColor ambient, GlsColor diffuse, GlsColor specular, GlsColor emission, float shininess, bool inUse, ColorMaterialMode_e mode)
 
str GetName ()
 
None SetName (str name)
 
GlsColor GetAmbient ()
 
None SetAmbient (GlsColor ambient)
 
GlsColor GetDiffuse ()
 
None SetDiffuse (GlsColor diffuse)
 
GlsColor GetSpecular ()
 
None SetSpecular (GlsColor specular)
 
GlsColor GetEmission ()
 
None SetEmission (GlsColor emission)
 
float GetShininess ()
 
None SetShininess (float shininess)
 
ColorMaterialMode_e GetColorMaterialMode ()
 
None SetColorMaterialMode (ColorMaterialMode_e mode)
 

Detailed Description

common editor interface material

Member Enumeration Documentation

◆ ColorMaterialMode_e

Enumerator
NO_COLOR_MATERIAL 

glColorMaterial will be disabled for the object

DIFFUSE_COLOR_MATERIAL 

glColorMaterial will be enabled for the diffuse material

AMBIENT_COLOR_MATERIAL 

glColorMaterial will be enabled for the ambient material

DIFFUSE_AND_AMBIENT_COLOR_MATERIAL 

glColorMaterial will be enabled for the diffuse & ambient materials

EMISSION_COLOR_MATERIAL 

glColorMaterial will be enabled for the emission material

SPECULAR_COLOR_MATERIAL 

glColorMaterial will be enabled for the specular material

Constructor & Destructor Documentation

◆ Material() [1/3]

Material::Material ( )

Default Constructor.

◆ Material() [2/3]

Material::Material ( Material src)

Copy Constructor.

Parameters
srcmaterial wrapper to copy

◆ Material() [3/3]

Material::Material ( str  name,
GlsColor  ambient,
GlsColor  diffuse,
GlsColor  specular,
GlsColor  emission,
float  shininess,
bool  inUse,
ColorMaterialMode_e  mode 
)

Creates a material with the given information set.

Parameters
namename of new material
ambientambient color of material
diffusediffuse color of material
specularspecular color of material
emissionemission color of material
shininessshininess of material
inUseflag whether the material is being used
modethe color material mode of the material

Member Function Documentation

◆ GetAmbient()

GlsColor Material::GetAmbient ( )

Retrieves the material's ambient color.

Returns
disti::GlsColor containing the ambient color of the material

◆ GetColorMaterialMode()

ColorMaterialMode_e Material::GetColorMaterialMode ( )

Retrieves the material's shininess.

Returns
float containing the shininess of the material

◆ GetDiffuse()

GlsColor Material::GetDiffuse ( )

Retrieves the material's diffuse color.

Returns
disti::GlsColor containing the diffuse color of the material

◆ GetEmission()

GlsColor Material::GetEmission ( )

Retrieves the material's emission color.

Returns
disti::GlsColor containing the emission color of the material

◆ GetName()

str Material::GetName ( )

Retrieves the material's name.

Returns
str containing the name of the material

◆ GetShininess()

float Material::GetShininess ( )

Retrieves the material's shininess.

Returns
float containing the shininess of the material

◆ GetSpecular()

GlsColor Material::GetSpecular ( )

Retrieves the material's specular color.

Returns
disti::GlsColor containing the specular color of the material

◆ SetAmbient()

None Material::SetAmbient ( GlsColor  ambient)

Sets the material's ambient color.

Parameters
ambientNew ambient color for the material

◆ SetColorMaterialMode()

None Material::SetColorMaterialMode ( ColorMaterialMode_e  mode)

Sets the material's emission color.

Parameters
modeNew color material mode for the material

◆ SetDiffuse()

None Material::SetDiffuse ( GlsColor  diffuse)

Sets the material's diffuse color.

Parameters
diffuseNew diffuse color for the material

◆ SetEmission()

None Material::SetEmission ( GlsColor  emission)

Sets the material's emission color.

Parameters
emissionNew emission color for the material

◆ SetName()

None Material::SetName ( str  name)

Sets the material's name.

Parameters
nameNew name of material

◆ SetShininess()

None Material::SetShininess ( float  shininess)

Sets the material's emission color.

Parameters
shininessNew shininess value for the material

◆ SetSpecular()

None Material::SetSpecular ( GlsColor  specular)

Sets the material's specular color.

Parameters
specularNew specular color for the material

The documentation for this class was generated from the following file: