| Python Script Engine 8.3 GL Studio Editor Python Script API

Public Types | Public Member Functions | List of all members
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 (String name, GlsColor ambient, GlsColor diffuse, GlsColor specular, GlsColor emission, float shininess, bool inUse, ColorMaterialMode_e mode)
String | GetName ()
void | SetName (String name)
GlsColor | GetAmbient ()
void | SetAmbient (GlsColor ambient)
GlsColor | GetDiffuse ()
void | SetDiffuse (GlsColor diffuse)
GlsColor | GetSpecular ()
void | SetSpecular (GlsColor specular)
GlsColor | GetEmission ()
void | SetEmission (GlsColor emission)
float | GetShininess ()
void | SetShininess (float shininess)
ColorMaterialMode_e | GetColorMaterialMode ()
void | SetColorMaterialMode (ColorMaterialMode_e mode)

## Detailed Description

common editor interface material

## Member Enumeration Documentation

## ◆ ColorMaterialMode_e

enum Material::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

  src | material wrapper to copy

## ◆ Material() [3/3]

Material::Material | ( | String | 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

  name | name of new material
  ambient | ambient color of material
  diffuse | diffuse color of material
  specular | specular color of material
  emission | emission color of material
  shininess | shininess of material
  inUse | flag whether the material is being used
  mode | the 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()

String Material::GetName | ( |  | ) |

Retrieves the material's name.

Returns
  String 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()

void Material::SetAmbient | ( | GlsColor | ambient | ) |

Sets the material's ambient color.

Parameters

  ambient | New ambient color for the material

## ◆ SetColorMaterialMode()

void Material::SetColorMaterialMode | ( | ColorMaterialMode_e | mode | ) |

Sets the material's emission color.

Parameters

  mode | New color material mode for the material

## ◆ SetDiffuse()

void Material::SetDiffuse | ( | GlsColor | diffuse | ) |

Sets the material's diffuse color.

Parameters

  diffuse | New diffuse color for the material

## ◆ SetEmission()

void Material::SetEmission | ( | GlsColor | emission | ) |

Sets the material's emission color.

Parameters

  emission | New emission color for the material

## ◆ SetName()

void Material::SetName | ( | String | name | ) |

Sets the material's name.

Parameters

  name | New name of material

## ◆ SetShininess()

void Material::SetShininess | ( | float | shininess | ) |

Sets the material's emission color.

Parameters

  shininess | New shininess value for the material

## ◆ SetSpecular()

void Material::SetSpecular | ( | GlsColor | specular | ) |

Sets the material's specular color.

Parameters

  specular | New specular color for the material

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

- Material.i